summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-06-01 10:25:54 +0200
committerKalle Valo <quic_kvalo@quicinc.com>2023-06-09 14:27:57 +0200
commitfad5ac80dfa5010d44c24d59d9e8e1552a447911 (patch)
tree68e01571b59f6c4f44e5520d4899e368ada58e00 /drivers/net/wireless
parentwifi: ath10k: Drop cleaning of driver data from probe error path and remove (diff)
downloadlinux-fad5ac80dfa5010d44c24d59d9e8e1552a447911.tar.xz
linux-fad5ac80dfa5010d44c24d59d9e8e1552a447911.zip
wifi: ath10k: Drop checks that are always false
platform_get_drvdata() cannot return NULL as the probe function calls platform_set_drvdata() with a non-NULL argument or returns with a failure. In the first case, platform_get_drvdata() returns this non-NULL value and in the second the remove callback isn't called at all. ath10k_ahb_priv() cannot return NULL and ar_ahb is unused after the check anyhow. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20230601082556.2738446-3-u.kleine-koenig@pengutronix.de
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath10k/ahb.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath10k/ahb.c b/drivers/net/wireless/ath/ath10k/ahb.c
index 7bb45c66cff7..fffdbad75074 100644
--- a/drivers/net/wireless/ath/ath10k/ahb.c
+++ b/drivers/net/wireless/ath/ath10k/ahb.c
@@ -823,15 +823,6 @@ err_core_destroy:
static int ath10k_ahb_remove(struct platform_device *pdev)
{
struct ath10k *ar = platform_get_drvdata(pdev);
- struct ath10k_ahb *ar_ahb;
-
- if (!ar)
- return -EINVAL;
-
- ar_ahb = ath10k_ahb_priv(ar);
-
- if (!ar_ahb)
- return -EINVAL;
ath10k_dbg(ar, ATH10K_DBG_AHB, "ahb remove\n");