[20/30] pcnet32: Add missing annotation for pcnet32_suspend()
diff mbox series

Message ID 20200214204741.94112-21-jbi.octave@gmail.com
State Not Applicable
Delegated to: David Miller
Headers show
Series
  • Untitled series #158661
Related show

Commit Message

Jules Irenge Feb. 14, 2020, 8:47 p.m. UTC
Sparse reports a warning at pcnet32_suspend()

warning: context imbalance in pcnet32_suspend() - unexpected unlock

The root cause is the missing annotation at pcnet32_suspend()
Add the missing __must_hold(&lp->lock) annotattion

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 drivers/net/ethernet/amd/pcnet32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
index dc7d88227e76..ac6c19441932 100644
--- a/drivers/net/ethernet/amd/pcnet32.c
+++ b/drivers/net/ethernet/amd/pcnet32.c
@@ -684,7 +684,7 @@  static void pcnet32_poll_controller(struct net_device *dev)
  * lp->lock must be held.
  */
 static int pcnet32_suspend(struct net_device *dev, unsigned long *flags,
-			   int can_sleep)
+			   int can_sleep) __must_hold(&lp->lock)
 {
 	int csr5;
 	struct pcnet32_private *lp = netdev_priv(dev);