]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
media: au0828: fix a NULL vs IS_ERR() check
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 May 2021 14:20:38 +0000 (16:20 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 13 Aug 2021 07:45:26 +0000 (09:45 +0200)
commitbf0b2b3755d29409362a84fafe01bcd9edb29dac
tree2584f269ff2eb146eff8ce1ba6622a29db34b83f
parent3b843f851213b99aa91e642dd2eb816db3a9c806
media: au0828: fix a NULL vs IS_ERR() check

BugLink: https://bugs.launchpad.net/bugs/1938199
[ Upstream commit 8f2e452730d2bcd59fe05246f0e19a4c52e0012d ]

The media_device_usb_allocate() function returns error pointers when
it's enabled and something goes wrong.  It can return NULL as well, but
only if CONFIG_MEDIA_CONTROLLER is disabled so that doesn't apply here.

Fixes: 812658d88d26 ("media: change au0828 to use Media Device Allocator API")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/media/usb/au0828/au0828-core.c