diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2008-10-11 00:16:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-11 12:54:07 -0400 |
commit | 5ba2f67afb02c5302b2898949ed6fc3b3d37dcf1 (patch) | |
tree | aa8954769e1eeb0aac55181e698166beaa61f633 | |
parent | 64f1b65382054f8bfd528f2c4253297c232816eb (diff) |
security: avoid calling a NULL function pointer in drivers/video/tvaudio.c
NULL function pointers are very bad security wise. This one got caught by
kerneloops.org quite a few times, so it's happening in the field....
Fix is simple, check the function pointer for NULL, like 6 other places
in the same function are already doing.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/media/video/tvaudio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c index 463680b13289..b59e47272abf 100644 --- a/drivers/media/video/tvaudio.c +++ b/drivers/media/video/tvaudio.c | |||
@@ -1792,7 +1792,7 @@ static int chip_command(struct i2c_client *client, | |||
1792 | break; | 1792 | break; |
1793 | case VIDIOC_S_FREQUENCY: | 1793 | case VIDIOC_S_FREQUENCY: |
1794 | chip->mode = 0; /* automatic */ | 1794 | chip->mode = 0; /* automatic */ |
1795 | if (desc->checkmode) { | 1795 | if (desc->checkmode && desc->setmode) { |
1796 | desc->setmode(chip,V4L2_TUNER_MODE_MONO); | 1796 | desc->setmode(chip,V4L2_TUNER_MODE_MONO); |
1797 | if (chip->prevmode != V4L2_TUNER_MODE_MONO) | 1797 | if (chip->prevmode != V4L2_TUNER_MODE_MONO) |
1798 | chip->prevmode = -1; /* reset previous mode */ | 1798 | chip->prevmode = -1; /* reset previous mode */ |