usb: misc: cypress_cy7c63: don't print on ENOMEM
All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d7f040e92f
commit
e83c06e99d
|
@ -79,7 +79,6 @@ static int vendor_command(struct cypress *dev, unsigned char request,
|
||||||
/* allocate some memory for the i/o buffer*/
|
/* allocate some memory for the i/o buffer*/
|
||||||
iobuf = kzalloc(CYPRESS_MAX_REQSIZE, GFP_KERNEL);
|
iobuf = kzalloc(CYPRESS_MAX_REQSIZE, GFP_KERNEL);
|
||||||
if (!iobuf) {
|
if (!iobuf) {
|
||||||
dev_err(&dev->udev->dev, "Out of memory!\n");
|
|
||||||
retval = -ENOMEM;
|
retval = -ENOMEM;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
@ -208,10 +207,8 @@ static int cypress_probe(struct usb_interface *interface,
|
||||||
|
|
||||||
/* allocate memory for our device state and initialize it */
|
/* allocate memory for our device state and initialize it */
|
||||||
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||||
if (dev == NULL) {
|
if (!dev)
|
||||||
dev_err(&interface->dev, "Out of memory!\n");
|
|
||||||
goto error_mem;
|
goto error_mem;
|
||||||
}
|
|
||||||
|
|
||||||
dev->udev = usb_get_dev(interface_to_usbdev(interface));
|
dev->udev = usb_get_dev(interface_to_usbdev(interface));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue