[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f2637234-7746-cb9d-6cf5-97d519090e84@users.sourceforge.net>
Date: Tue, 29 Aug 2017 07:31:58 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-media@...r.kernel.org, linux-usb@...r.kernel.org,
Antoine Jacquet <royale@...ezo.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 1/4] [media] zr364xx: Delete an error message for a failed
memory allocation in two functions
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 28 Aug 2017 22:23:56 +0200
Omit an extra message for a memory allocation failure in these functions.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/media/usb/zr364xx/zr364xx.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/media/usb/zr364xx/zr364xx.c b/drivers/media/usb/zr364xx/zr364xx.c
index efdcd5bd6a4c..97af697dcc81 100644
--- a/drivers/media/usb/zr364xx/zr364xx.c
+++ b/drivers/media/usb/zr364xx/zr364xx.c
@@ -212,7 +212,5 @@ static int send_control_msg(struct usb_device *udev, u8 request, u16 value,
- if (!transfer_buffer) {
- dev_err(&udev->dev, "kmalloc(%d) failed\n", size);
+ if (!transfer_buffer)
return -ENOMEM;
- }
memcpy(transfer_buffer, cp, size);
@@ -1427,7 +1425,5 @@ static int zr364xx_probe(struct usb_interface *intf,
- if (cam == NULL) {
- dev_err(&udev->dev, "cam: out of memory !\n");
+ if (!cam)
return -ENOMEM;
- }
cam->v4l2_dev.release = zr364xx_release;
err = v4l2_device_register(&intf->dev, &cam->v4l2_dev);
--
2.14.1
Powered by blists - more mailing lists