Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mt76: fix return value of mt76x02_wait_for_mac
@ 2018-09-06  9:38 Stanislaw Gruszka
       [not found] ` <1536226714-17201-1-git-send-email-sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Stanislaw Gruszka @ 2018-09-06  9:38 UTC (permalink / raw)
  To: linux-wireless-u79uwXL29TY76Z2rM5mHXA
  Cc: Lorenzo Bianconi, Felix Fietkau,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Dan Carpenter

We need to return bool value in mt76x02_wait_for_mac.

Reported-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Fixes: 2735a6dd7df3 ("mt76: unify wait_for_mac")
Signed-off-by: Stanislaw Gruszka <sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h
index 1a5da35702e6..a8bb3fede8d5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.h
@@ -165,7 +165,7 @@ static inline bool mt76x02_wait_for_mac(struct mt76_dev *dev)
 
 	for (i = 0; i < 500; i++) {
 		if (test_bit(MT76_REMOVED, &dev->state))
-			return -EIO;
+			return false;
 
 		switch (dev->bus->rr(dev, MAC_CSR0)) {
 		case 0:
-- 
2.7.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mt76: fix return value of mt76x02_wait_for_mac
       [not found] ` <1536226714-17201-1-git-send-email-sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2018-09-22 12:11   ` Felix Fietkau
  0 siblings, 0 replies; 2+ messages in thread
From: Felix Fietkau @ 2018-09-22 12:11 UTC (permalink / raw)
  To: Stanislaw Gruszka, linux-wireless-u79uwXL29TY76Z2rM5mHXA
  Cc: Lorenzo Bianconi, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Dan Carpenter

On 2018-09-06 11:38, Stanislaw Gruszka wrote:
> We need to return bool value in mt76x02_wait_for_mac.
> 
> Reported-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Fixes: 2735a6dd7df3 ("mt76: unify wait_for_mac")
> Signed-off-by: Stanislaw Gruszka <sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Merged, thanks.

- Felix

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-22 12:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-06  9:38 [PATCH] mt76: fix return value of mt76x02_wait_for_mac Stanislaw Gruszka
     [not found] ` <1536226714-17201-1-git-send-email-sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-09-22 12:11   ` Felix Fietkau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox