lan78xx: Return 0 when lan78xx_suspend() has no error.
authorWoojung.Huh@microchip.com <Woojung.Huh@microchip.com>
Fri, 25 Sep 2015 21:13:48 +0000 (21:13 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Sep 2015 05:28:53 +0000 (22:28 -0700)
lan78xx_suspend() may return non-zero from lan78xx_write_reg() in some scenario.
Fix to return 0 when lan78xx_suspend() has no error.

Signed-off-by: Woojung Huh <woojung.huh@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/lan78xx.c

index d2a5f3f88b132991cbd4d26afe9abed3765209ea..226668ead0d8c1ba9e6a0edf906a2122a5e74d2e 100644 (file)
@@ -3204,7 +3204,6 @@ int lan78xx_suspend(struct usb_interface *intf, pm_message_t message)
        int ret;
        int event;
 
-       ret = 0;
        event = message.event;
 
        if (!dev->suspend_count++) {
@@ -3286,6 +3285,7 @@ int lan78xx_suspend(struct usb_interface *intf, pm_message_t message)
                }
        }
 
+       ret = 0;
 out:
        return ret;
 }