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

From: SF Markus Elfring
Date: Wed May 17 2017 - 07:54:43 EST


From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/spi/spi-bfin5xx.c | 1 -
1 file changed, 1 deletion(-)

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;
}
--
2.13.0