From: Bjørn Mork Date: Fri, 1 Nov 2013 13:18:56 +0000 (+0100) Subject: net: cdc_mbim: fixup error return value X-Git-Tag: v3.13-rc1~105^2~68^2 X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=e62416e8e4e086652cfc88b88921708964aac3b5;p=~andy%2Flinux net: cdc_mbim: fixup error return value Reported-by: Oliver Neukum Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller --- diff --git a/drivers/net/usb/cdc_mbim.c b/drivers/net/usb/cdc_mbim.c index 347e6b92673..c9f3281506a 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