diff options
author | Shuah Khan <skhan@linuxfoundation.org> | 2022-04-29 15:09:13 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-06-14 16:52:40 +0200 |
commit | eeb7777f4771733ae730f447f98a2d47d9ed39f4 (patch) | |
tree | a6c486eeefaa413571545ab3e65def9e70f25cb0 | |
parent | 5127c0f365265bb69cd776ad6e4b872c309f3fa8 (diff) | |
download | linux-stable-eeb7777f4771733ae730f447f98a2d47d9ed39f4.tar.gz linux-stable-eeb7777f4771733ae730f447f98a2d47d9ed39f4.tar.bz2 linux-stable-eeb7777f4771733ae730f447f98a2d47d9ed39f4.zip |
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>
-rw-r--r-- | drivers/mfd/rtsx_usb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mfd/rtsx_usb.c b/drivers/mfd/rtsx_usb.c index 691dab791f7a..e94f855eac15 100644 --- a/drivers/mfd/rtsx_usb.c +++ b/drivers/mfd/rtsx_usb.c @@ -678,6 +678,7 @@ static int rtsx_usb_probe(struct usb_interface *intf, return 0; out_init_fail: + usb_set_intfdata(ucr->pusb_intf, NULL); usb_free_coherent(ucr->pusb_dev, IOBUF_SIZE, ucr->iobuf, ucr->iobuf_dma); return ret; |