cx25840: fix unchecked return values
authorPan Bian <bianpan2016@163.com>
Sun, 23 Apr 2017 13:06:36 +0000 (10:06 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:48:22 +0000 (19:48 +0200)
commit7c484e3bcf10c9a83e78fe77fc3d4d0b8074b12c
treed3775b896014748f9abaef9bad990289ce88ee8d
parent20c29d92ce653c216e1adb892bcb04846871d537
cx25840: fix unchecked return values

[ Upstream commit 35378ce143071c2a6bad4b59a000e9b9f8f6ea67 ]

In functions cx25840_initialize(), cx231xx_initialize(), and
cx23885_initialize(), the return value of create_singlethread_workqueue()
is used without validation. This may result in NULL dereference and cause
kernel crash. This patch fixes it.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/i2c/cx25840/cx25840-core.c