diff mbox series

[-next,2/2] ath9k: Remove unnecessary print function dev_err()

Message ID 20220408000113.129906-2-yang.lee@linux.alibaba.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series [-next,1/2] wcn36xx: clean up some inconsistent indenting | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Yang Li April 8, 2022, 12:01 a.m. UTC
The print function dev_err() is redundant because
platform_get_irq_byname() already prints an error.

Eliminate the follow coccicheck warning:
./drivers/net/wireless/ath/ath9k/ahb.c:103:2-9: line 103 is redundant
because platform_get_irq() already prints an error

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/net/wireless/ath/ath9k/ahb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Toke Høiland-Jørgensen April 8, 2022, 11:53 a.m. UTC | #1
Yang Li <yang.lee@linux.alibaba.com> writes:

> The print function dev_err() is redundant because
> platform_get_irq_byname() already prints an error.
>
> Eliminate the follow coccicheck warning:
> ./drivers/net/wireless/ath/ath9k/ahb.c:103:2-9: line 103 is redundant
> because platform_get_irq() already prints an error
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>

Heh, so I was the one originally insisting on keeping that err print,
but looking a bit closer now it does really appear to be redundant, so:

Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Kalle Valo April 12, 2022, 1:13 p.m. UTC | #2
Yang Li <yang.lee@linux.alibaba.com> wrote:

> The print function dev_err() is redundant because
> platform_get_irq_byname() already prints an error.
> 
> Eliminate the follow coccicheck warning:
> ./drivers/net/wireless/ath/ath9k/ahb.c:103:2-9: line 103 is redundant
> because platform_get_irq() already prints an error
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

d7ceee8051ba ath9k: Remove unnecessary print function dev_err()
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
index c9b853af41d1..9cd12b20b18d 100644
--- a/drivers/net/wireless/ath/ath9k/ahb.c
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
@@ -99,10 +99,8 @@  static int ath_ahb_probe(struct platform_device *pdev)
 	}
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(&pdev->dev, "no IRQ resource found\n");
+	if (irq < 0)
 		return irq;
-	}
 
 	ath9k_fill_chanctx_ops();
 	hw = ieee80211_alloc_hw(sizeof(struct ath_softc), &ath9k_ops);