]> git.baikalelectronics.ru Git - kernel.git/commit
media: em28xx: Don't use ops->suspend if it is NULL
authorColin Ian King <colin.king@canonical.com>
Fri, 17 Sep 2021 16:07:02 +0000 (18:07 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 5 Oct 2021 07:38:18 +0000 (09:38 +0200)
commitf8660fd07ab708b624ba02a93ee0f7eac9ce11bd
tree90885a85e9155025f86b765184091545e09b7590
parentdb05559db73ff3abab820dc3a71d9387414fcc88
media: em28xx: Don't use ops->suspend if it is NULL

The call to ops->suspend for the dev->dev_next case can currently
trigger a call on a null function pointer if ops->suspend is null.
Skip over the use of function ops->suspend if it is null.

Addresses-Coverity: ("Dereference after null check")

Fixes: 02a2ddf8a10a ("media: em28xx: Hauppauge DualHD second tuner functionality")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/usb/em28xx/em28xx-core.c