Re: [PATCH v7 28/34] i2c: tegra: Consolidate error handling in tegra_i2c_xfer_msg()

From: Thierry Reding
Date: Thu Sep 17 2020 - 08:13:39 EST


On Wed, Sep 09, 2020 at 01:40:00AM +0300, Dmitry Osipenko wrote:
> Consolidate error handling in tegra_i2c_xfer_msg() into a common code
> path in order to make code cleaner.
>
> Reviewed-by: Michał Mirosław <mirq-linux@xxxxxxxxxxxx>
> Signed-off-by: Dmitry Osipenko <digetx@xxxxxxxxx>
> ---
> drivers/i2c/busses/i2c-tegra.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)

I'm really not sure this is cleaner. You've got a net positive diffstat
and you add goto. That's not always bad, but in this case there is no
need for any complicated error unwinding, so I don't think this is any
better than the previous code.

Thierry

Attachment: signature.asc
Description: PGP signature