diff mbox

[1/2] smsc911x: fix smsc911x_reg_read compiler warning

Message ID 1231594169-24988-1-git-send-email-steve.glendinning@smsc.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Steve Glendinning Jan. 10, 2009, 1:29 p.m. UTC
if this code path is ever hit, the platform_data struct isn't properly
configured with a bus width flag so the device won't work (hence the
BUG()).

This patch adds a dummy return statement to eliminate this compiler
warning:

drivers/net/smsc911x.c: In function 'smsc911x_reg_read':
drivers/net/smsc911x.c:148: warning: control reaches end of non-void function

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
---
 drivers/net/smsc911x.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

David Miller Jan. 11, 2009, 8:14 a.m. UTC | #1
From: Steve Glendinning <steve.glendinning@smsc.com>
Date: Sat, 10 Jan 2009 13:29:28 +0000

> if this code path is ever hit, the platform_data struct isn't properly
> configured with a bus width flag so the device won't work (hence the
> BUG()).
> 
> This patch adds a dummy return statement to eliminate this compiler
> warning:
> 
> drivers/net/smsc911x.c: In function 'smsc911x_reg_read':
> drivers/net/smsc911x.c:148: warning: control reaches end of non-void function
> 
> Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
index dc3f110..1f443d8 100644
--- a/drivers/net/smsc911x.c
+++ b/drivers/net/smsc911x.c
@@ -144,6 +144,7 @@  static inline u32 smsc911x_reg_read(struct smsc911x_data *pdata, u32 reg)
 	}
 
 	BUG();
+	return 0;
 }
 
 static inline void smsc911x_reg_write(struct smsc911x_data *pdata, u32 reg,