Skip to content

Commit

Permalink
net: cdc_mbim: fixup error return value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bjørn Mork authored and David S. Miller committed Nov 4, 2013
1 parent c37ac9b commit e62416e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/usb/cdc_mbim.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,15 +369,13 @@ static int cdc_mbim_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in)

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
Expand Down

0 comments on commit e62416e

Please sign in to comment.