Re: [PATCH] HID: intel-thc-hid: intel-quicki2c: Fix the return value in quicki2c_dev_init() kernel-doc
From: Andy Shevchenko
Date: Sat Sep 12 2026 - 08:50:00 EST
On Sat, Sep 12, 2026 at 02:21:43AM +0200, Karl Mehltretter wrote:
> quicki2c_dev_init() returns an ERR_PTR() on failure, but its kernel-doc
> says that failure returns NULL. This mismatch was present in the
> original driver skeleton.
>
> Document the error pointer returned by the initialization paths.
...
> * Return: Pointer to the quicki2c_device structure if success
> - * or NULL on failure.
> + * or an ERR_PTR() on failure.
" * or an error pointer on failure."
> */
...
The rule of thumb: Among options always choose the one that is less cryptic and
uses more plain English.
--
With Best Regards,
Andy Shevchenko