diff options
author | Wolfram Sang <wsa-dev@sang-engineering.com> | 2016-08-25 13:39:13 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-30 13:17:37 -0400 |
commit | e83c06e99df6de5a0ba9710280385a6da4084c76 (patch) | |
tree | 8b2f32e3a096d5fa66372a9440046c3302466087 /drivers/usb | |
parent | d7f040e92fa0465ff08d2a1e46f0149d9eb65616 (diff) |
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/misc/cypress_cy7c63.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/misc/cypress_cy7c63.c b/drivers/usb/misc/cypress_cy7c63.c index 402b94dd2531..5c93a888c40e 100644 --- a/drivers/usb/misc/cypress_cy7c63.c +++ b/drivers/usb/misc/cypress_cy7c63.c | |||
@@ -79,7 +79,6 @@ static int vendor_command(struct cypress *dev, unsigned char request, | |||
79 | /* allocate some memory for the i/o buffer*/ | 79 | /* allocate some memory for the i/o buffer*/ |
80 | iobuf = kzalloc(CYPRESS_MAX_REQSIZE, GFP_KERNEL); | 80 | iobuf = kzalloc(CYPRESS_MAX_REQSIZE, GFP_KERNEL); |
81 | if (!iobuf) { | 81 | if (!iobuf) { |
82 | dev_err(&dev->udev->dev, "Out of memory!\n"); | ||
83 | retval = -ENOMEM; | 82 | retval = -ENOMEM; |
84 | goto error; | 83 | goto error; |
85 | } | 84 | } |
@@ -208,10 +207,8 @@ static int cypress_probe(struct usb_interface *interface, | |||
208 | 207 | ||
209 | /* allocate memory for our device state and initialize it */ | 208 | /* allocate memory for our device state and initialize it */ |
210 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); | 209 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
211 | if (dev == NULL) { | 210 | if (!dev) |
212 | dev_err(&interface->dev, "Out of memory!\n"); | ||
213 | goto error_mem; | 211 | goto error_mem; |
214 | } | ||
215 | 212 | ||
216 | dev->udev = usb_get_dev(interface_to_usbdev(interface)); | 213 | dev->udev = usb_get_dev(interface_to_usbdev(interface)); |
217 | 214 | ||