OSDN Git Service

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)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 2 Jun 2021 11:30:28 +0000 (13:30 +0200)
commit8f2e452730d2bcd59fe05246f0e19a4c52e0012d
tree6db5644252aad8e2f7572d893056bf4e2f077b7c
parent1fcbeeb506fd785025a37d1a874108756abbef6b
media: au0828: fix a NULL vs IS_ERR() check

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>
drivers/media/usb/au0828/au0828-core.c