diff options
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 |