Skip to content

Commit

Permalink
r8152: Cancel hw_phy_work if we have an error in probe
Browse files Browse the repository at this point in the history
[ Upstream commit bb8adff ]

The error handling in rtl8152_probe() is missing a call to cancel the
hw_phy_work. Add it in to match what's in the cleanup code in
rtl8152_disconnect().

Fixes: a028a9e ("r8152: move the settings of PHY to a work queue")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
dianders authored and gregkh committed Nov 2, 2023
1 parent 56e8946 commit 0fd9553
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/usb/r8152.c
Original file line number Diff line number Diff line change
Expand Up @@ -9802,6 +9802,7 @@ static int rtl8152_probe(struct usb_interface *intf,

out1:
tasklet_kill(&tp->tx_tl);
cancel_delayed_work_sync(&tp->hw_phy_work);
if (tp->rtl_ops.unload)
tp->rtl_ops.unload(tp);
usb_set_intfdata(intf, NULL);
Expand Down

0 comments on commit 0fd9553

Please sign in to comment.