Skip to content

Commit

Permalink
smsc75xx: don't call usbnet_resume if usbnet_suspend fails
Browse files Browse the repository at this point in the history
If usbnet_suspend returns an error we don't want to call
usbnet_resume to clean up, but instead just return the error.

If usbnet_suspend *does* succeed, and we have a problem further
on, the desired behaviour is still to call usbnet_resume
to clean up before returning.

Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Steve Glendinning authored and David S. Miller committed Nov 30, 2012
1 parent 06a31e2 commit 2305c54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/usb/smsc75xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1411,7 +1411,7 @@ static int smsc75xx_suspend(struct usb_interface *intf, pm_message_t message)
int ret;

ret = usbnet_suspend(intf, message);
check_warn_goto_done(ret, "usbnet_suspend error\n");
check_warn_return(ret, "usbnet_suspend error\n");

if (pdata->suspend_flags) {
netdev_warn(dev->net, "error during last resume\n");
Expand Down

0 comments on commit 2305c54

Please sign in to comment.