Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH] HID: intel-thc-hid: intel-quicki2c: Fix the return value in quicki2c_dev_init() kernel-doc
@ 2026-09-12  0:21 Karl Mehltretter
  2026-09-12  0:36 ` sashiko-bot
  2026-09-12 12:45 ` Andy Shevchenko
  0 siblings, 2 replies; 3+ messages in thread
From: Karl Mehltretter @ 2026-09-12  0:21 UTC (permalink / raw)
  To: Even Xu, Xinpeng Sun, Jiri Kosina, Benjamin Tissoires
  Cc: Karl Mehltretter, Andy Shevchenko, linux-input, linux-kernel

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.

Fixes: 61bb2714dc3a ("HID: intel-thc-hid: intel-quicki2c: Add THC QuickI2C driver skeleton")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
---
 drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c b/drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c
index 0d2ad7bc3648a2f227db2ed27ad9cbe18955bc0f..aa601ef613c91729f4fc90bdc1674cb838921421 100644
--- a/drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c
+++ b/drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c
@@ -380,7 +380,7 @@ exit:
  * If success, enable THC hardware interrupt.
  *
  * Return: Pointer to the quicki2c_device structure if success
- * or NULL on failure.
+ * or an ERR_PTR() on failure.
  */
 static struct quicki2c_device *quicki2c_dev_init(struct pci_dev *pdev, void __iomem *mem_addr,
 						 const struct quicki2c_ddata *ddata)
-- 
2.39.5 (Apple Git-154)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-12 12:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-12  0:21 [PATCH] HID: intel-thc-hid: intel-quicki2c: Fix the return value in quicki2c_dev_init() kernel-doc Karl Mehltretter
2026-09-12  0:36 ` sashiko-bot
2026-09-12 12:45 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox