From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Subject: [PATCH 1/2] spi-bfin5xx: Delete an error message for a failed memory allocation in bfin_spi_setup() Date: Wed, 17 May 2017 13:54:29 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: LKML , kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Wolfram Sang To: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mark Brown Return-path: In-Reply-To: Content-Language: en-US Sender: linux-spi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: From: Markus Elfring 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html