Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ba2f67a authored by Arjan van de Ven's avatar Arjan van de Ven Committed by Linus Torvalds
Browse files

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: default avatarArjan van de Ven <arjan@linux.intel.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 64f1b653
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1792,7 +1792,7 @@ static int chip_command(struct i2c_client *client,
		break;
		break;
	case VIDIOC_S_FREQUENCY:
	case VIDIOC_S_FREQUENCY:
		chip->mode = 0; /* automatic */
		chip->mode = 0; /* automatic */
		if (desc->checkmode) {
		if (desc->checkmode && desc->setmode) {
			desc->setmode(chip,V4L2_TUNER_MODE_MONO);
			desc->setmode(chip,V4L2_TUNER_MODE_MONO);
			if (chip->prevmode != V4L2_TUNER_MODE_MONO)
			if (chip->prevmode != V4L2_TUNER_MODE_MONO)
				chip->prevmode = -1; /* reset previous mode */
				chip->prevmode = -1; /* reset previous mode */