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

Commit 54a4b2b4 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: line6: Fix NULL dereference at podhd_disconnect()



When podhd_init() failed with the acquiring a ctrl i/f, the line6
helper still calls the disconnect callback that eventually calls again
usb_driver_release_interface() with the NULL intf.

Put the proper NULL check before calling it for avoiding an Oops.

Fixes: fc90172b ("ALSA: line6: Claim pod x3 usb data interface")
Reported-by: default avatarAndrey Konovalov <andreyknvl@google.com>
Tested-by: default avatarAndrey Konovalov <andreyknvl@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent cb02ffc7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -301,6 +301,7 @@ static void podhd_disconnect(struct usb_line6 *line6)

		intf = usb_ifnum_to_if(line6->usbdev,
					pod->line6.properties->ctrl_if);
		if (intf)
			usb_driver_release_interface(&podhd_driver, intf);
	}
}