[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1097eb0c-fd33-3229-90be-417aca3795bd@users.sourceforge.net>
Date: Sat, 27 Jan 2018 17:14:14 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-input@...r.kernel.org,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
"Gustavo A. R. Silva" <garsilva@...eddedor.com>,
Joe Perches <joe@...ches.com>,
Kees Cook <keescook@...omium.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 1/2] Input: gamecon: Delete an error message for a failed
memory allocation in gc_attach()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 27 Jan 2018 16:27:11 +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/input/joystick/gamecon.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c
index 2ffb2e8bdc3b..f6006383d30d 100644
--- a/drivers/input/joystick/gamecon.c
+++ b/drivers/input/joystick/gamecon.c
@@ -966,10 +966,8 @@ static void gc_attach(struct parport *pp)
}
gc = kzalloc(sizeof(struct gc), GFP_KERNEL);
- if (!gc) {
- pr_err("Not enough memory\n");
+ if (!gc)
goto err_unreg_pardev;
- }
mutex_init(&gc->mutex);
gc->pd = pd;
--
2.16.1
Powered by blists - more mailing lists