__module_put_and_exit() doesn't return.
[smatch.git] / validation / sm_implied4.c
blob9e2d6147de38fd0c00d0cc2537e6e876e6d22d39
1 void _spin_lock(int name);
2 void _spin_unlock(int name);
4 void frob(void){}
5 int a;
6 int b;
7 int c;
8 int func (void)
10 int mylock = 1;
11 int mylock2 = 2;
13 if (!a)
14 _spin_lock(mylock);
15 if (b)
16 frob();
17 if (!a)
18 _spin_unlock(mylock);
19 if (a)
20 _spin_lock(mylock);
21 if (c)
22 return 0;
23 if (a)
24 _spin_unlock(mylock);
25 return 0;
29 * check-name: Smatch implied #4
30 * check-command: smatch sm_implied4.c
32 * check-output-start
33 sm_implied4.c +22 func(14) warn: 'mylock' is sometimes locked here and sometimes unlocked.
34 * check-output-end