Jelajahi Sumber

ieee802154: ca8210: Delete an error message for a failed memory allocation in ca8210_probe()

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Markus Elfring 8 tahun lalu
induk
melakukan
8ec4a1e950
1 mengubah file dengan 0 tambahan dan 4 penghapusan
  1. 0 4
      drivers/net/ieee802154/ca8210.c

+ 0 - 4
drivers/net/ieee802154/ca8210.c

@@ -3143,10 +3143,6 @@ static int ca8210_probe(struct spi_device *spi_device)
 
 	pdata = kmalloc(sizeof(*pdata), GFP_KERNEL);
 	if (!pdata) {
-		dev_crit(
-			&spi_device->dev,
-			"Could not allocate platform data\n"
-		);
 		ret = -ENOMEM;
 		goto error;
 	}