diff mbox

[next-next] net: ethernet: aquantia: return -ETIME in macro AQ_HW_WAIT_FOR

Message ID 20170127150646.19181-1-colin.king@canonical.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Colin Ian King Jan. 27, 2017, 3:06 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The macro is returning ETIME which means various checks to see if
the returned err is less than zero never work. I believe a -ETIME
should be returned instead.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller Jan. 29, 2017, 11:24 p.m. UTC | #1
From: Colin King <colin.king@canonical.com>
Date: Fri, 27 Jan 2017 15:06:46 +0000

> From: Colin Ian King <colin.king@canonical.com>
> 
> The macro is returning ETIME which means various checks to see if
> the returned err is less than zero never work. I believe a -ETIME
> should be returned instead.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.
diff mbox

Patch

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.h b/drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.h
index 78fcc0c..03b72dd 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.h
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.h
@@ -31,7 +31,7 @@  do { \
 		udelay(_US_); \
 	} \
 	if (!AQ_HW_WAIT_FOR_i) {\
-		err = ETIME; \
+		err = -ETIME; \
 	} \
 } while (0)