[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 2 Feb 2018 21:09:53 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: kernel-janitors@...r.kernel.org,
Dan Carpenter <dan.carpenter@...cle.com>,
"David S. Miller" <davem@...emloft.net>,
Kees Cook <keescook@...omium.org>,
Sebastian Reichel <sre@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/2] HSI: ssi_protocol: Delete an error message for a failed
memory allocation in ssi_protocol_probe()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Fri, 2 Feb 2018 20:02:17 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/hsi/clients/ssi_protocol.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/hsi/clients/ssi_protocol.c b/drivers/hsi/clients/ssi_protocol.c
index 9b167bc6eee4..0bccea2fa119 100644
--- a/drivers/hsi/clients/ssi_protocol.c
+++ b/drivers/hsi/clients/ssi_protocol.c
@@ -1088,10 +1088,8 @@ static int ssi_protocol_probe(struct device *dev)
int err;
ssi = kzalloc(sizeof(*ssi), GFP_KERNEL);
- if (!ssi) {
- dev_err(dev, "No memory for ssi protocol\n");
+ if (!ssi)
return -ENOMEM;
- }
spin_lock_init(&ssi->lock);
timer_setup(&ssi->rx_wd, ssip_rx_wd, TIMER_DEFERRABLE);
--
2.16.1
Powered by blists - more mailing lists