media: gspca: properly check for errors in po1030_probe()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 May 2021 11:57:30 +0000 (13:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Jun 2021 07:00:43 +0000 (09:00 +0200)
commit32aba713787902a8b26170ccd3008cb0317aaa5a
treea657b8c7bfea6a52b80811873c945587dbedcec8
parent3d8ac40a7f22006ac9ec003f7ff342f46e645262
media: gspca: properly check for errors in po1030_probe()

[ Upstream commit dacb408ca6f0e34df22b40d8dd5fae7f8e777d84 ]

If m5602_write_sensor() or m5602_write_bridge() fail, do not continue to
initialize the device but return the error to the calling funtion.

Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Link: https://lore.kernel.org/r/20210503115736.2104747-64-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/usb/gspca/m5602/m5602_po1030.c