smsc75xx: don't call usbnet_resume if usbnet_suspend fails
authorSteve Glendinning <steve.glendinning@shawell.net>
Fri, 30 Nov 2012 04:52:43 +0000 (04:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Nov 2012 17:27:20 +0000 (12:27 -0500)
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>
drivers/net/usb/smsc75xx.c

index 18238060f1c087ee0d5a8b4990144b841c56ff4b..86d924951d2e42a37d5bbdaa4e8bf4d9b283394f 100644 (file)
@@ -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");