mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 09:34:12 +08:00
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>
This commit is contained in:
parent
c37ac9b22b
commit
e62416e8e4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user