extra: tweak hard max in conditions and macros
[smatch.git] / validation / sm_dev_hold.c
blobf69f70f3858fa18187f38d5d90494b40e8056186
1 void dev_hold(int *x);
3 void dev_put(int *x){}
5 extern int y,z;
6 int *x;
8 int func (void)
10 dev_hold(x);
11 if (y) {
12 dev_put(x);
13 return -1;
15 if (z) {
16 return -1;
18 return 0;
21 * check-name: dev_hold() check
22 * check-command: smatch --project=kernel sm_dev_hold.c
24 * check-output-start
25 sm_dev_hold.c:16 func() warn: 'x' held on error path.
26 * check-output-end