summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Senna Tschudin <peter.senna@collabora.com>2016-01-15 18:41:33 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-01-24 21:04:54 -0800
commitf40849b86862c00f24db10bc11fe2e972c029ec4 (patch)
tree4ab1faf91181f6139ae2ab8d2ecf6fa0b8f3d59c
parent8a102fd6c99a26a0aa74e3d4bed4092b3c791361 (diff)
downloadop-kernel-dev-f40849b86862c00f24db10bc11fe2e972c029ec4.zip
op-kernel-dev-f40849b86862c00f24db10bc11fe2e972c029ec4.tar.gz
usb-misc: sisusbvga: Remove memory allocation logs
This patch remove three calls to dev_err() from sisusb_probe() as reporting memory allocation failures is redundant: - Remove a call to dev_err() that was reporting unsuccesful call to kzalloc(). - Remove two calls to dev_err() that were reporting unsuccesful calls to kmalloc(). One call to dev_err() reporting memory allocation is left unchanged as the last patch of the series removes it. Signed-off-by: Peter Senna Tschudin <peter.senna@collabora.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c
index bea6d88..b3713d5 100644
--- a/drivers/usb/misc/sisusbvga/sisusb.c
+++ b/drivers/usb/misc/sisusbvga/sisusb.c
@@ -3036,10 +3036,9 @@ static int sisusb_probe(struct usb_interface *intf,
/* Allocate memory for our private */
sisusb = kzalloc(sizeof(*sisusb), GFP_KERNEL);
- if (!sisusb) {
- dev_err(&dev->dev, "Failed to allocate memory for private data\n");
+ if (!sisusb)
return -ENOMEM;
- }
+
kref_init(&sisusb->kref);
mutex_init(&(sisusb->lock));
@@ -3066,7 +3065,6 @@ static int sisusb_probe(struct usb_interface *intf,
sisusb->ibufsize = SISUSB_IBUF_SIZE;
sisusb->ibuf = kmalloc(SISUSB_IBUF_SIZE, GFP_KERNEL);
if (!sisusb->ibuf) {
- dev_err(&sisusb->sisusb_dev->dev, "Failed to allocate memory for input buffer");
retval = -ENOMEM;
goto error_2;
}
@@ -3077,7 +3075,6 @@ static int sisusb_probe(struct usb_interface *intf,
sisusb->obuf[i] = kmalloc(SISUSB_OBUF_SIZE, GFP_KERNEL);
if (!sisusb->obuf[i]) {
if (i == 0) {
- dev_err(&sisusb->sisusb_dev->dev, "Failed to allocate memory for output buffer\n");
retval = -ENOMEM;
goto error_3;
}
OpenPOWER on IntegriCloud