diff options
author | Bjørn Mork <bjorn@mork.no> | 2013-11-01 09:18:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-11-04 15:40:16 -0500 |
commit | e62416e8e4e086652cfc88b88921708964aac3b5 (patch) | |
tree | b98db1c8f8f3f4d2ae128631c580c803ad0f705e /drivers/net/usb | |
parent | c37ac9b22b6732c0c9dc17076ebe84e841d4eb16 (diff) |
net: cdc_mbim: fixup error return value
Reported-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/cdc_mbim.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/usb/cdc_mbim.c b/drivers/net/usb/cdc_mbim.c index 347e6b926735..c9f3281506af 100644 --- a/drivers/net/usb/cdc_mbim.c +++ b/drivers/net/usb/cdc_mbim.c | |||
@@ -369,15 +369,13 @@ error: | |||
369 | 369 | ||
370 | static int cdc_mbim_suspend(struct usb_interface *intf, pm_message_t message) | 370 | static int cdc_mbim_suspend(struct usb_interface *intf, pm_message_t message) |
371 | { | 371 | { |
372 | int ret = 0; | 372 | int ret = -ENODEV; |
373 | struct usbnet *dev = usb_get_intfdata(intf); | 373 | struct usbnet *dev = usb_get_intfdata(intf); |
374 | struct cdc_mbim_state *info = (void *)&dev->data; | 374 | struct cdc_mbim_state *info = (void *)&dev->data; |
375 | struct cdc_ncm_ctx *ctx = info->ctx; | 375 | struct cdc_ncm_ctx *ctx = info->ctx; |
376 | 376 | ||
377 | if (ctx == NULL) { | 377 | if (!ctx) |
378 | ret = -1; | ||
379 | goto error; | 378 | goto error; |
380 | } | ||
381 | 379 | ||
382 | /* | 380 | /* |
383 | * Both usbnet_suspend() and subdriver->suspend() MUST return 0 | 381 | * Both usbnet_suspend() and subdriver->suspend() MUST return 0 |