diff options
author | Nimrod Andy <B38611@freescale.com> | 2014-10-13 10:53:48 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-14 12:53:37 -0400 |
commit | 5bc26726ada73264c0fd7b93ccbe7d9e78b2b2d2 (patch) | |
tree | c537b4ff0ae35446eb08ea1f36284d6888241d28 /drivers/net/ethernet/intel/fm10k/fm10k_main.c | |
parent | c53fed07a03d8b2a2e3bdaba87768211fa55806c (diff) |
net: fec: Fix sparse warnings with different lock contexts for basic block
reproduce:
make ARCH=arm C=1 2>fec.txt drivers/net/ethernet/freescale/fec_main.o
cat fec.txt
sparse warnings:
drivers/net/ethernet/freescale/fec_main.c:2916:12: warning: context imbalance
in 'fec_set_features' - different lock contexts for basic block
Christopher Li suggest to change as below:
if (need_lock) {
lock();
do_something_real();
unlock();
} else {
do_something_real();
}
Reported-by: Fabio Estevam <festevam@gmail.com>
Suggested-by: Christopher Li <sparse@chrisli.org>
Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/fm10k/fm10k_main.c')
0 files changed, 0 insertions, 0 deletions