diff mbox

[1/2] spi-bfin5xx: Delete an error message for a failed memory allocation in bfin_spi_setup()

Message ID e3b3b509-7db7-ac85-c2ff-3a02d7cd900d@users.sourceforge.net (mailing list archive)
State Rejected
Headers show

Commit Message

SF Markus Elfring May 17, 2017, 11:54 a.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 17 May 2017 13:00:34 +0200

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>
---
 drivers/spi/spi-bfin5xx.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/spi/spi-bfin5xx.c b/drivers/spi/spi-bfin5xx.c
index 249c7a3677c9..3265f4967d2b 100644
--- a/drivers/spi/spi-bfin5xx.c
+++ b/drivers/spi/spi-bfin5xx.c
@@ -983,6 +983,5 @@  static int bfin_spi_setup(struct spi_device *spi)
 		chip = kzalloc(sizeof(*chip), GFP_KERNEL);
 		if (!chip) {
-			dev_err(&spi->dev, "cannot allocate chip data\n");
 			ret = -ENOMEM;
 			goto error;
 		}