aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDariusz Marcinkiewicz <darekm@google.com>2020-06-22 13:46:36 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-06-25 13:12:03 +0200
commit29a2a30064c49e6811562b22261dd39ee9be9092 (patch)
treeb190eddd2028a41923f867c45cb9011ac0045469
parentdd247fb8db12045e35af98dd81fa3b877677c097 (diff)
media: cros-ec-cec: do not bail on device_init_wakeup failurebr-v5.9cfor-v5.9c
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. v2: add Fixes tags 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>
-rw-r--r--drivers/media/cec/platform/cros-ec/cros-ec-cec.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
index 0e7e2772f08f..2d95e16cd248 100644
--- a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
+++ b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
@@ -277,11 +277,7 @@ static int cros_ec_cec_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, cros_ec_cec);
cros_ec_cec->cros_ec = cros_ec;
- ret = device_init_wakeup(&pdev->dev, 1);
- if (ret) {
- dev_err(&pdev->dev, "failed to initialize wakeup\n");
- return ret;
- }
+ device_init_wakeup(&pdev->dev, 1);
cros_ec_cec->adap = cec_allocate_adapter(&cros_ec_cec_ops, cros_ec_cec,
DRV_NAME,

Privacy Policy