]> git.baikalelectronics.ru Git - kernel.git/commit
media: atomisp: only initialize mode if pipe is not null
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 8 Nov 2021 09:40:25 +0000 (09:40 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 08:11:58 +0000 (08:11 +0000)
commit61f7894d1b97c6a91aedd21f4efa13aca07bded7
tree799cdd86226ec91ad0ef7c560009ca8f0affe36a
parentd98cff7ea82a466e3b412b707755335f43e6c901
media: atomisp: only initialize mode if pipe is not null

During atomisp register, udev tries to open all devices. For
some, pipe is NULL, at least during register time, causing the
driver to try to access a NULL pointer.

So, add an extra check to avoid such condition.

Link: https://lore.kernel.org/linux-media/6406265f2d5f3791d5c7cbd1364186217f19524c.1636364423.git.mchehab+huawei@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_fops.c