Re: [PATCH] rtc: max77686: Remove some dead code

From: Krzysztof Kozlowski
Date: Mon May 10 2021 - 09:02:15 EST


On 08/05/2021 01:43, Christophe JAILLET wrote:
> 'ret' is known to be an error pointer here, so it can't be 0.
> Remove this dead code.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
> ---
> drivers/rtc/rtc-max77686.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
> index d51cc12114cb..ce089ed934ad 100644
> --- a/drivers/rtc/rtc-max77686.c
> +++ b/drivers/rtc/rtc-max77686.c
> @@ -764,8 +764,6 @@ static int max77686_rtc_probe(struct platform_device *pdev)
> if (IS_ERR(info->rtc_dev)) {
> ret = PTR_ERR(info->rtc_dev);
> dev_err(&pdev->dev, "Failed to register RTC device: %d\n", ret);
> - if (ret == 0)
> - ret = -EINVAL;
> goto err_rtc;


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxx>


Best regards,
Krzysztof