]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns: Fix for variable may be used uninitialized warnings
authorHuazhong Tan <tanhuazhong@huawei.com>
Thu, 18 Jan 2018 02:37:34 +0000 (10:37 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Jan 2018 20:36:44 +0000 (15:36 -0500)
commit5a744b1b7db8ee7da1b02dad90d07f4cbd9f238b
tree4a5ed21f57d0caa836ba5e144c6dd851cbfca2d3
parent6e5f4ec44de52d9bec95f079e250fd8f71493b98
net: hns: Fix for variable may be used uninitialized warnings

When !CONFIG_REGMAP hns throws compiler warnings since
dsaf_read_syscon ignores the return result from regmap_read,
which allows val to be uninitialized.

Fixes: a4e36423e56a ("net: hns: add syscon operation for dsaf")
Reported-by: Jason Gunthorpe <jgg@ziepe.ca>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h