浏览代码

smsc911x: fix smsc911x_reg_read compiler warning

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Steve Glendinning 16 年之前
父节点
当前提交
702403af28
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/net/smsc911x.c

+ 1 - 0
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,