mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-11 08:54:28 -05:00
23 lines
781 B
Diff
23 lines
781 B
Diff
|
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
|
||
|
index b2ff88e69a81..3d4f7959dabb 100644
|
||
|
--- a/drivers/net/usb/asix_devices.c
|
||
|
+++ b/drivers/net/usb/asix_devices.c
|
||
|
@@ -626,7 +626,7 @@ static int asix_suspend(struct usb_interface *intf, pm_message_t message)
|
||
|
struct usbnet *dev = usb_get_intfdata(intf);
|
||
|
struct asix_common_private *priv = dev->driver_priv;
|
||
|
|
||
|
- if (priv->suspend)
|
||
|
+ if (priv && priv->suspend)
|
||
|
priv->suspend(dev);
|
||
|
|
||
|
return usbnet_suspend(intf, message);
|
||
|
@@ -678,7 +678,7 @@ static int asix_resume(struct usb_interface *intf)
|
||
|
struct usbnet *dev = usb_get_intfdata(intf);
|
||
|
struct asix_common_private *priv = dev->driver_priv;
|
||
|
|
||
|
- if (priv->resume)
|
||
|
+ if (priv && priv->resume)
|
||
|
priv->resume(dev);
|
||
|
|
||
|
return usbnet_resume(intf);
|