misc: rtsx: set NULL intfdata when probe fails
authorShuah Khan <skhan@linuxfoundation.org>
Fri, 29 Apr 2022 21:09:13 +0000 (15:09 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:36:21 +0000 (18:36 +0200)
commite7686d80fc3cfad24aad859c69069b00dd2e2875
treecc9a6ecc6ec32163d5f7dab3cb73bcaf3a1845a0
parent89401b5e9cf3e9b416dd04a43dc9193264b388f1
misc: rtsx: set NULL intfdata when probe fails

[ Upstream commit f861d36e021e1ac4a0a2a1f6411d623809975d63 ]

rtsx_usb_probe() doesn't call usb_set_intfdata() to null out the
interface pointer when probe fails. This leaves a stale pointer.
Noticed the missing usb_set_intfdata() while debugging an unrelated
invalid DMA mapping problem.

Fix it with a call to usb_set_intfdata(..., NULL).

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20220429210913.46804-1-skhan@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/misc/cardreader/rtsx_usb.c