[PATCH 1/2] Input: turbografx: Delete an error message for a failed memory allocation in tgfx_attach()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 27 Jan 2018 15:43:38 +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@xxxxxxxxxxxxxxxxxxxxx>
---
 drivers/input/joystick/turbografx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/input/joystick/turbografx.c b/drivers/input/joystick/turbografx.c
index e2685753e460..454d4c032292 100644
--- a/drivers/input/joystick/turbografx.c
+++ b/drivers/input/joystick/turbografx.c
@@ -192,10 +192,8 @@ static void tgfx_attach(struct parport *pp)
 	}
 
 	tgfx = kzalloc(sizeof(struct tgfx), GFP_KERNEL);
-	if (!tgfx) {
-		printk(KERN_ERR "turbografx.c: Not enough memory\n");
+	if (!tgfx)
 		goto err_unreg_pardev;
-	}
 
 	mutex_init(&tgfx->sem);
 	tgfx->pd = pd;
-- 
2.16.1

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux