aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/yurex.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa-dev@sang-engineering.com>2016-08-25 13:39:25 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-30 13:17:38 -0400
commit0c2bc5c2cb267c41f073132d1817df917ab8ba47 (patch)
treebe52f572693db6a9cfc0cacc206f60f807d1e494 /drivers/usb/misc/yurex.c
parentc9220ba512af2c71171251d032b191d6bb9dba62 (diff)
usb: misc: yurex: 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/misc/yurex.c')
-rw-r--r--drivers/usb/misc/yurex.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c
index bb606bdc25e5..54e53ac4c08f 100644
--- a/drivers/usb/misc/yurex.c
+++ b/drivers/usb/misc/yurex.c
@@ -200,10 +200,8 @@ static int yurex_probe(struct usb_interface *interface, const struct usb_device_
200 200
201 /* allocate memory for our device state and initialize it */ 201 /* allocate memory for our device state and initialize it */
202 dev = kzalloc(sizeof(*dev), GFP_KERNEL); 202 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
203 if (!dev) { 203 if (!dev)
204 dev_err(&interface->dev, "Out of memory\n");
205 goto error; 204 goto error;
206 }
207 kref_init(&dev->kref); 205 kref_init(&dev->kref);
208 mutex_init(&dev->io_mutex); 206 mutex_init(&dev->io_mutex);
209 spin_lock_init(&dev->lock); 207 spin_lock_init(&dev->lock);
@@ -236,10 +234,8 @@ static int yurex_probe(struct usb_interface *interface, const struct usb_device_
236 234
237 /* allocate buffer for control req */ 235 /* allocate buffer for control req */
238 dev->cntl_req = kmalloc(YUREX_BUF_SIZE, GFP_KERNEL); 236 dev->cntl_req = kmalloc(YUREX_BUF_SIZE, GFP_KERNEL);
239 if (!dev->cntl_req) { 237 if (!dev->cntl_req)
240 dev_err(&interface->dev, "Could not allocate cntl_req\n");
241 goto error; 238 goto error;
242 }
243 239
244 /* allocate buffer for control msg */ 240 /* allocate buffer for control msg */
245 dev->cntl_buffer = usb_alloc_coherent(dev->udev, YUREX_BUF_SIZE, 241 dev->cntl_buffer = usb_alloc_coherent(dev->udev, YUREX_BUF_SIZE,