Re: [PATCH 13/13] media: i2c: ds90ub953: Add error handling for i2c reads/writes
From: Andy Shevchenko
Date: Thu Oct 10 2024 - 10:07:26 EST
On Fri, Oct 04, 2024 at 05:46:44PM +0300, Tomi Valkeinen wrote:
> Add error handling for i2c reads/writes in various places.
...
> + ret = ub953_write(priv, UB953_REG_CLKOUT_CTRL1, clkout_ctrl1);
> + if (ret)
> + return ret;
> +
> + return 0;
This is just a more verbose version of
return ub953_write(priv, UB953_REG_CLKOUT_CTRL1, clkout_ctrl1);
...
> - ub953_write_clkout_regs(priv, &clkout_data);
> -
> - return 0;
> + return ub953_write_clkout_regs(priv, &clkout_data);
...and seems you use that pattern.
--
With Best Regards,
Andy Shevchenko