Re: [PATCH] serial: 8250_of: fix return code when probe function fails to get reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Masahiro,

On Wed, 2017-12-27 at 14:21 +0900, Masahiro Yamada wrote:
> The error pointer from devm_reset_control_get_optional_shared() is
> not propagated.
>
> One of the most common problem scenarios is it returns -EPROBE_DEFER
> when the reset controller has not probed yet.  In this case, the
> probe of the reset consumer should be deferred.

Thank you for this fix! In the error case, ret was last set by:

        ret = of_alias_get_id(np, "serial");

Depending on device tree alias setup this might return a positive number
or -ENODEV instead of propagating the error value.

> Fixes: e2860e1f62f2 ("serial: 8250_of: Add reset support")
> Cc: stable@xxxxxxxxxxxxxxx # v4.13+
> Signed-off-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>

Reviewed-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>

regards
Philipp
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux