diff options
author | Julia Lawall <julia@diku.dk> | 2011-03-23 16:42:56 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-23 19:46:39 -0700 |
commit | d9d691f584bd012d235c35279c043a2ccd23d7d7 (patch) | |
tree | 9094c048d6df951f14e2fb1cc790366791fdd7d5 /Documentation/hwmon/adt7470 | |
parent | 73210a135b9dd53ba59beb4ced5a55633ae65b2f (diff) | |
download | kernel_samsung_smdk4412-d9d691f584bd012d235c35279c043a2ccd23d7d7.zip kernel_samsung_smdk4412-d9d691f584bd012d235c35279c043a2ccd23d7d7.tar.gz kernel_samsung_smdk4412-d9d691f584bd012d235c35279c043a2ccd23d7d7.tar.bz2 |
drivers/tty/bfin_jtag_comm.c: avoid calling put_tty_driver on NULL
put_tty_driver calls tty_driver_kref_put on its argument, and then
tty_driver_kref_put calls kref_put on the address of a field of this
argument. kref_put checks for NULL, but in this case the field is likely
to have some offset and so the result of taking its address will not be
NULL. Labels are added to be able to skip over the call to put_tty_driver
when the argument will be NULL.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression *x;
@@
*if (x == NULL)
{ ...
* put_tty_driver(x);
...
return ...;
}
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Torben Hohn <torbenh@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/hwmon/adt7470')
0 files changed, 0 insertions, 0 deletions