From: Haibo Chen <haibo.chen@xxxxxxx> If SoC claim to support stop mode, but dts file do not contain the stop mode properity, this should not block the driver probe. For this case, the driver only need to skip the wakeup capable setting which means this device do not support the feature to wakeup system. Signed-off-by: Haibo Chen <haibo.chen@xxxxxxx> --- drivers/net/can/flexcan/flexcan-core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/flexcan/flexcan-core.c b/drivers/net/can/flexcan/flexcan-core.c index a3f3a9c909be..d8be69f4a0c3 100644 --- a/drivers/net/can/flexcan/flexcan-core.c +++ b/drivers/net/can/flexcan/flexcan-core.c @@ -1987,7 +1987,14 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev) /* return 0 directly if doesn't support stop mode feature */ return 0; - if (ret) + /* If ret is -EINVAL, this means SoC claim to support stop mode, but + * dts file lack the stop mode property definition. For this case, + * directly return 0, this will skip the wakeup capable setting and + * will not block the driver probe. + */ + if (ret == -EINVAL) + return 0; + else if (ret) return ret; device_set_wakeup_capable(&pdev->dev, true); -- 2.34.1