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>
Mon, 9 May 2022 13:40:15 +0000 (15:40 +0200)
commitf861d36e021e1ac4a0a2a1f6411d623809975d63
treea1a07333693e1ecd9fd27f92a800b492b3523270
parent9145554d3613299c8f9b0d17c62762cb6b0c4e41
misc: rtsx: set NULL intfdata when probe fails

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>
drivers/misc/cardreader/rtsx_usb.c