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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:56:05 +0000 (16:56 +0200)
commit5091f2738d78a9267616d5740ebf70ce44bd4881
tree2119eb85f3bd3a16895794bd72c3d331a70bde49
parent31157148a591e6b52ecd0c318ea909b20fc21e4c
media: au0828: fix a NULL vs IS_ERR() check

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