diff options
author | 2016-11-16 16:07:10 +0100 | |
---|---|---|
committer | 2016-11-16 18:30:22 +0100 | |
commit | 735bb39ca3bed8469b3b3a42d8cc57bdb9fc4dd7 (patch) | |
tree | c758ef8c99674b53bc952a425eaf7daaea73ade9 /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | Merge tag 'iio-for-4.10c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next (diff) | |
download | wireguard-linux-735bb39ca3bed8469b3b3a42d8cc57bdb9fc4dd7.tar.xz wireguard-linux-735bb39ca3bed8469b3b3a42d8cc57bdb9fc4dd7.zip |
staging: wilc1000: simplify vif[i]->ndev accesses
With gcc-7, I got a new warning for this driver:
wilc1000/linux_wlan.c: In function 'wilc_netdev_cleanup':
wilc1000/linux_wlan.c:1224:15: error: 'vif[1]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
wilc1000/linux_wlan.c:1224:15: error: 'vif[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
A closer look at the function reveals that it's more complex than
it needs to be, given that based on how the device is created
we always get
netdev_priv(vif->ndev) == vif
Based on this assumption, I found a few other places in the same file
that can be simplified. That code appears to be a relic from times
when the assumption above was not valid.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions