media: cros-ec-cec: do not bail on device_init_wakeup failure
authorDariusz Marcinkiewicz <darekm@google.com>
Mon, 22 Jun 2020 11:46:36 +0000 (13:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:23:52 +0000 (08:23 +0200)
commit2b8e23834a57b3db93972dedd04f2eeaf5e44e99
tree45658986d090f99bffc0da04c2aab5031a2ad8b8
parent0bc8f2d8332b4d62ae650e7eed1773e6de110d81
media: cros-ec-cec: do not bail on device_init_wakeup failure

[ Upstream commit 6f01dfb760c027d5dd6199d91ee9599f2676b5c6 ]

Do not fail probing when device_init_wakeup fails.

device_init_wakeup fails when the device is already enabled as wakeup
device. Hence, the driver fails to probe the device if:
- The device has already been enabled for wakeup (by e.g. sysfs)
- The driver has been unloaded and is being loaded again.

This goal of the patch is to fix the above cases.

Overwhelming majority of the drivers do not check device_init_wakeup
return code.

Fixes: cd70de2d356ee ("media: platform: Add ChromeOS EC CEC driver")
Signed-off-by: Dariusz Marcinkiewicz <darekm@google.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/platform/cros-ec-cec/cros-ec-cec.c