diff mbox series

drivers: fwnode: fix fwnode_irq_get_byname() kerneldoc

Message ID Y1dzCCMCDswQFVvO@dc75zzyyyyyyyyyyyyyby-3.rev.dnainternet.fi
State New
Headers show
Series drivers: fwnode: fix fwnode_irq_get_byname() kerneldoc | expand

Commit Message

Matti Vaittinen Oct. 25, 2022, 5:24 a.m. UTC
The fwnode_irq_get_byname() may return zero on device-tree mapping
error. Fix documentation to reflect this as current documentation
suggests check:

if (ret < 0)
is enough to detect the errors. This is not the case.

Add zero as a return value indicating error.

Fixes: ca0acb511c21 ("device property: Add fwnode_irq_get_byname")
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
---
 drivers/base/property.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/base/property.c b/drivers/base/property.c
index 4d6278a84868..df437d10aa08 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -960,7 +960,7 @@  EXPORT_SYMBOL(fwnode_irq_get);
  * string.
  *
  * Return:
- * Linux IRQ number on success, or negative errno otherwise.
+ * Linux IRQ number on success, zero or negative errno otherwise.
  */
 int fwnode_irq_get_byname(const struct fwnode_handle *fwnode, const char *name)
 {