Re: [PATCH] iio: pressure: hsc030pa: Fix i2c_transfer return value check
From: Andy Shevchenko
Date: Thu Jan 29 2026 - 10:54:13 EST
On Thu, Jan 29, 2026 at 05:01:46PM +0200, Antoniu Miclaus wrote:
> The i2c_transfer() function returns the number of messages
> successfully transferred. The function sends 1 message but checks
> for ret == 2, which can never be true. This causes the function to
> always return an error (1) instead of success (0).
>
> Fix the check to compare against the actual number of messages sent.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
--
With Best Regards,
Andy Shevchenko