If reset property is missing in DT, then we get this warning:
designware_i2c@0: Can't get reset: -2
Avoid this by checking if reset DT property is present, first.
Fixes: 622597dee4f ("i2c: designware: add reset ctrl to driver")
Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
ret = reset_get_bulk(bus, &priv->resets);
if (ret) {
- if (ret != -ENOTSUPP)
+ if (ret != -ENOTSUPP && ret != -ENOENT)
dev_warn(bus, "Can't get reset: %d\n", ret);
} else {
reset_deassert_bulk(&priv->resets);