Re: [PATCH v3] mfd: gateworks-gsc: Propagate I2C read errors
From: shao.mingyin
Date: Thu Nov 26 2026 - 22:53:38 EST
Hi Lee,
> Should we propagate the return value of regmap_read()?
Yes. v4 stores the regmap_read() result in ret and returns that error
on failure for the firmware version and both CRC reads. If the SMBus
read ultimately fails, gsc_read() returns its errno. Probe stops before
registering the child devices if the version or either CRC read fails.
> Also, really not a fan of functions in if()s.
Understood; the revision keeps the calls outside the conditionals.
Thanks,
Shao