Re: [PATCH v3 1/5] media: hi846: fix hi846_write_reg_16 handling

From: Markus Elfring

Date: Mon May 11 2026 - 05:51:41 EST



> Fix this by resetting *err to 0 only when it is positive.

How do you think about to handle return values by an adjusted interface?
https://elixir.bootlin.com/linux/v7.1-rc2/source/drivers/media/i2c/hi846.c#L1265-L1282

Would a function signature (like the following) be nicer?

static int hi846_write_reg_16(struct hi846 *hi846, u16 reg, u16 val);

Regards,
Markus