gspca: Delete two error messages for a failed memory allocation in gspca_dev_probe2()
Subsystems (3)
PATCH 1/1 gspca: Delete two error messages for a failed memory allocation in gspca_dev_probe2()
From: Markus Elfring <[email protected]>
Date: Mon, 18 Sep 2017 17:47:58 +0200
Omit extra messages for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
--- drivers/media/usb/gspca/gspca.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/media/usb/gspca/gspca.c +2 -4
@@ -2037,10 +2037,8 @@ int gspca_dev_probe2(struct usb_interface *intf, -if (!gspca_dev) { -pr_err ("couldn't kzalloc gspca struct\n" ); +if (!gspca_dev)return -ENOMEM ; - } + gspca_dev->usb_buf =kmalloc (USB_BUF_SZ ,GFP_KERNEL );if (!gspca_dev->usb_buf) { -pr_err ("out of memory\n" ); ret = -ENOMEM ; goto out; }
Signature · 1 line
2.14.1