Re: [PATCH] iio: magnetometer: ak8975: remove unnecessary braces

From: Andy Shevchenko

Date: Fri Apr 17 2026 - 14:30:29 EST


On Fri, Apr 17, 2026 at 01:02:24PM +0000, Joshua Crofts wrote:
> Remove unnecessary braces at single if statement block.
>
> No functional change.

Code wise is good, but I think it's an unneeded churn as a standalone change.
Up to Jonathan.

...

> ret = i2c_smbus_write_byte_data(data->client,
> data->def->ctrl_regs[CNTL], regval);
> - if (ret < 0) {
> + if (ret < 0)
> return ret;
> - }
> +
> data->cntl_cache = regval;
> /* After mode change wait atleast 100us */

Side note: you can also fix a typo (missing space) and

> usleep_range(100, 500);

move the driver to use fsleep().

(In a separate change.)

--
With Best Regards,
Andy Shevchenko