From 2305c54ffc389f1e73f2b1122a4c75bb0e8e6601 Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Fri, 30 Nov 2012 04:52:43 +0000 Subject: [PATCH] smsc75xx: don't call usbnet_resume if usbnet_suspend fails 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 Signed-off-by: David S. Miller --- drivers/net/usb/smsc75xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c index 18238060f1c0..86d924951d2e 100644 --- a/drivers/net/usb/smsc75xx.c +++ b/drivers/net/usb/smsc75xx.c @@ -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"); -- 2.20.1