Skip to content

Commit 785ec30

Browse files
Jingoo Handavem330
authored andcommitted
net: wireless: remove unnecessary platform_set_drvdata()
The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d06 (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bf3a33c commit 785ec30

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

drivers/net/wireless/ath/ath5k/ahb.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ static int ath_ahb_probe(struct platform_device *pdev)
185185

186186
err_free_hw:
187187
ieee80211_free_hw(hw);
188-
platform_set_drvdata(pdev, NULL);
189188
err_iounmap:
190189
iounmap(mem);
191190
err_out:
@@ -221,7 +220,6 @@ static int ath_ahb_remove(struct platform_device *pdev)
221220

222221
ath5k_deinit_ah(ah);
223222
iounmap(ah->iobase);
224-
platform_set_drvdata(pdev, NULL);
225223
ieee80211_free_hw(hw);
226224

227225
return 0;

drivers/net/wireless/ath/ath9k/ahb.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ static int ath_ahb_probe(struct platform_device *pdev)
150150
free_irq(irq, sc);
151151
err_free_hw:
152152
ieee80211_free_hw(hw);
153-
platform_set_drvdata(pdev, NULL);
154153
return ret;
155154
}
156155

@@ -164,7 +163,6 @@ static int ath_ahb_remove(struct platform_device *pdev)
164163
ath9k_deinit_device(sc);
165164
free_irq(sc->irq, sc);
166165
ieee80211_free_hw(sc->hw);
167-
platform_set_drvdata(pdev, NULL);
168166
}
169167

170168
return 0;

0 commit comments

Comments
 (0)