[PATCH v2 2/3] i2c: k1: add reset support
Guodong Xu
guodong at riscstar.com
Thu Dec 25 15:38:22 PST 2025
Hi, Andi
On Fri, Dec 26, 2025 at 5:01 AM Andi Shyti <andi.shyti at kernel.org> wrote:
>
> Hi Encrow,
>
> ...
>
> > + rst = devm_reset_control_get_optional_exclusive_deasserted(dev, NULL);
> > + if (IS_ERR(rst))
> > + return dev_err_probe(dev, PTR_ERR(rst),
> > + "failed to acquire deasserted reset\n");
>
> If this is optional, why are we returning with error?
>
According to include/linux/reset.h, if the requested reset is not
specified in the device tree, this function returns NULL instead of
an error. Therefore, IS_ERR(rst) will only be true for actual
errors (e.g probe deferral).
BR,
Guodong
> Thanks,
> Andi
More information about the linux-riscv
mailing list