Skip to content

Commit 5dd1768

Browse files
diandersdavem330
authored andcommitted
r8152: Run the unload routine if we have errors during probe
The rtl8152_probe() function lacks a call to the chip-specific unload() routine when it sees an error in probe. Add it in to match the cleanup code in rtl8152_disconnect(). Fixes: ac718b6 ("net/usb: new driver for RTL8152") Signed-off-by: Douglas Anderson <[email protected]> Reviewed-by: Grant Grundler <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a5feba7 commit 5dd1768

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/usb/r8152.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9783,6 +9783,8 @@ static int rtl8152_probe(struct usb_interface *intf,
97839783

97849784
out1:
97859785
tasklet_kill(&tp->tx_tl);
9786+
if (tp->rtl_ops.unload)
9787+
tp->rtl_ops.unload(tp);
97869788
usb_set_intfdata(intf, NULL);
97879789
out:
97889790
free_netdev(netdev);

0 commit comments

Comments
 (0)