Message ID | 1354125469-29671-1-git-send-email-steve.glendinning@shawell.net |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
From: Steve Glendinning <steve.glendinning@shawell.net> Date: Wed, 28 Nov 2012 17:57:49 +0000 > 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> Steve, can you do me a huge favor? Get rid of these silly macros from this driver. Any CPP macro that alters control flow is too evil to live. And we've worked tirelessly to remove every instance of such a macro from the core networking interfaces, because they always lead to hard to diagnose bugs. THanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c index 1823806..86d9249 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");
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> --- drivers/net/usb/smsc75xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)