Re: [PATCH] media: v4l: cci: Fix devm_cci_regmap_init_i2c() kernel-doc return value

From: Andy Shevchenko

Date: Sat Sep 12 2026 - 08:44:17 EST


On Sat, Sep 12, 2026 at 10:27 AM Karl Mehltretter
<kmehltretter@xxxxxxxxx> wrote:
>
> devm_cci_regmap_init_i2c() returns a struct regmap pointer (or an
> ERR_PTR() from devm_regmap_init_i2c()), but its kernel-doc says "%0 on
> success", which was never true. Describe the pointer.

...

> * Note the memory for the created regmap is devm() managed, tied to the client.
> *
> - * Return: %0 on success or a negative error code on failure.
> + * Return: the regmap on success or an ERR_PTR() on failure.
> */

What about

* Return: An error pointer on failure or a valid pointer
* to a struct regmap. The regmap will be automatically freed by the
* device management code.
*/

?

The part of the proposed text is taken from other v4l2 header files.

--
With Best Regards,
Andy Shevchenko