summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/cdc_mbim.c
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2013-11-01 14:18:56 +0100
committerDavid S. Miller <davem@davemloft.net>2013-11-04 15:40:16 -0500
commite62416e8e4e086652cfc88b88921708964aac3b5 (patch)
treeb98db1c8f8f3f4d2ae128631c580c803ad0f705e /drivers/net/usb/cdc_mbim.c
parentc37ac9b22b6732c0c9dc17076ebe84e841d4eb16 (diff)
downloadlinux-e62416e8e4e086652cfc88b88921708964aac3b5.tar.bz2
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/cdc_mbim.c')
-rw-r--r--drivers/net/usb/cdc_mbim.c6
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:
static int cdc_mbim_suspend(struct usb_interface *intf, pm_message_t message)
{
- int ret = 0;
+ int ret = -ENODEV;
struct usbnet *dev = usb_get_intfdata(intf);
struct cdc_mbim_state *info = (void *)&dev->data;
struct cdc_ncm_ctx *ctx = info->ctx;
- if (ctx == NULL) {
- ret = -1;
+ if (!ctx)
goto error;
- }
/*
* Both usbnet_suspend() and subdriver->suspend() MUST return 0