Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f58f97fa authored by Colin Leroy's avatar Colin Leroy Committed by Greg Kroah-Hartman
Browse files

[PATCH] USB: check for device in zd1201_resume



My patch adding PM support for zd1201 didn't check for the device on
resume, which can oops if the device has been removed.

This patch fixes it.

Signed-off-by: default avatarColin Leroy <colin@colino.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a3c900bb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1905,6 +1905,9 @@ static int zd1201_resume(struct usb_interface *interface)
{
	struct zd1201 *zd = usb_get_intfdata(interface);

	if (!zd || !zd->dev)
		return -ENODEV;

	netif_device_attach(zd->dev);

	if (zd->was_enabled)