Revert "rsi: fix potential null dereference in rsi_probe()"
Subsystems (3)
PATCH 2/2 rsi: drop bogus device-id checks from probe
In reply to Johan HovoldUSB core will never call a USB-driver probe function with a NULL device-id pointer.
--- drivers/net/wireless/rsi/rsi_91x_usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/rsi/rsi_91x_usb.c +2 -2
@@ -785,10 +785,10 @@ static int rsi_probe(struct usb_interface *pfunction,rsi_dbg (ERR_ZONE ,"%s: Initialized os intf ops\n" , __func__); -if (id && id->idProduct ==RSI_USB_PID_9113 ) { +if (id->idProduct ==RSI_USB_PID_9113 ) {rsi_dbg (INIT_ZONE ,"%s: 9113 module detected\n" , __func__); adapter->device_model =RSI_DEV_9113 ; - }else if (id && id->idProduct ==RSI_USB_PID_9116 ) { + }else if (id->idProduct ==RSI_USB_PID_9116 ) {rsi_dbg (INIT_ZONE ,"%s: 9116 module detected\n" , __func__); adapter->device_model =RSI_DEV_9116 ; }else {
Signature · 1 line
2.23.0
PATCH 1/2 Revert "rsi: fix potential null dereference in rsi_probe()"
This reverts commit f170d44bc4ec2feae5f6206980e7ae7fbf0432a0.
USB core will never call a USB-driver probe function with a NULL device-id pointer.
Reverting before removing the existing checks in order to document this and prevent the offending commit from being "autoselected" for stable.
--- drivers/net/wireless/rsi/rsi_91x_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/rsi/rsi_91x_usb.c +1 -1
@@ -793,7 +793,7 @@ static int rsi_probe(struct usb_interface *pfunction, adapter->device_model =RSI_DEV_9116 ; }else {rsi_dbg (ERR_ZONE ,"%s: Unsupported RSI device id 0x%x\n" , - __func__, id ? id->idProduct :0x0 ); + __func__, id->idProduct); goto err1; }
Signature · 1 line
2.23.0
Quoted 9 lines · Johan Hovold
This reverts commit
f170d44bc4ec2feae5f6206980e7ae7fbf0432a0.USB core will never call a USB-driver probe function with a NULL device-id pointer.
Reverting before removing the existing checks in order to document this and prevent the offending commit from being "autoselected" for stable.
Signed-off-by Johan Hovold <[email protected]>
I'll queue these two to v5.4.
Signature · 1 line
Kalle Valo
Quoted 7 lines · Kalle Valo
Quoted 5 lines · Johan Hovold
This reverts commit
f170d44bc4ec2feae5f6206980e7ae7fbf0432a0.USB core will never call a USB-driver probe function with a NULL device-id pointer.
Quoted 6 lines
Quoted 4 lines
Reverting before removing the existing checks in order to document this and prevent the offending commit from being "autoselected" for stable.
Signed-off-by Johan Hovold <[email protected]>I'll queue these two to v5.4.
Actually I'll take that back. Commit f170d44bc4ec is in -next so I have to also queue these to -next.
Signature · 1 line
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 12 lines · Kalle Valo
Quoted 10 lines · Kalle Valo
Quoted 8 lines · Johan Hovold
This reverts commit
f170d44bc4ec2feae5f6206980e7ae7fbf0432a0.USB core will never call a USB-driver probe function with a NULL device-id pointer.
Reverting before removing the existing checks in order to document this and prevent the offending commit from being "autoselected" for stable.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Johan Hovold <[email protected]>I'll queue these two to v5.4.
Actually I'll take that back. Commit
f170d44bc4ecis in -next so I have to also queue these to -next.
That's right. I'm assuming you don't rebase your branches, otherwise just dropping the offending patch might of course be an option instead of the revert.
Johan
Quoted 15 lines · Johan Hovold
Quoted 14 lines · Kalle Valo
Quoted 12 lines · Kalle Valo
Quoted 9 lines · Johan Hovold
This reverts commit
f170d44bc4ec2feae5f6206980e7ae7fbf0432a0.USB core will never call a USB-driver probe function with a NULL device-id pointer.
Reverting before removing the existing checks in order to document this and prevent the offending commit from being "autoselected" for stable.
Signed-off-by Johan Hovold <[email protected]>
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
I'll queue these two to v5.4.
Actually I'll take that back. Commit
f170d44bc4ecis in -next so I have to also queue these to -next.That's right. I'm assuming you don't rebase your branches, otherwise just dropping the offending patch might of course be an option instead of the revert.
Yeah, I don't rebase my trees so we have to do a revert.
Signature · 1 line
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 9 lines · Johan Hovold
This reverts commit
f170d44bc4ec2feae5f6206980e7ae7fbf0432a0.USB core will never call a USB-driver probe function with a NULL device-id pointer.
Reverting before removing the existing checks in order to document this and prevent the offending commit from being "autoselected" for stable.
Signed-off-by Johan Hovold <[email protected]>
2 patches applied to wireless-drivers-next.git, thanks.
c5dcf8f0e850 Revert "rsi: fix potential null dereference in rsi_probe()" 39e50f5ce26c rsi: drop bogus device-id checks from probe
Signature · 3 lines
https://patchwork.kernel.org/patch/11174711/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches