From patchwork Tue Oct 25 05:24:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 13018486 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C69B2C04A95 for ; Tue, 25 Oct 2022 05:24:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230447AbiJYFYs (ORCPT ); Tue, 25 Oct 2022 01:24:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230341AbiJYFYm (ORCPT ); Tue, 25 Oct 2022 01:24:42 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7BECBBE1D; Mon, 24 Oct 2022 22:24:41 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id bn35so6692985ljb.5; Mon, 24 Oct 2022 22:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=TVytv0a4cjMk9lrwtG4w8hPvQBP8qabYQWD39/Mm8gU=; b=buVpW2cCDje1OJjiB/F72+1QhTWqpAJHlcwOYdulAbgJHe/Df6qGapuhHuClK5l/vn b4BRbEPDic480X2guACkeF6Nqxr5ISnEqtVlTmQkLihU5eoM0XiCiIEWmdNoargre79j PzhGbcxQ0gOzSaBv0akKGH9UF3l9xyMoyBVS3Z57JHddqiZmJ7JIh0soWSUm0TuOBSkh C6ispySx5h4rsBcwJFBom6zNOtFgOvkjD7aAqftAV/7s5SO5jCa8m8JjXemIxclekSvF EKcWW8aZ56HAK6ckCAWBuXGnMoxogRTqsi1G6iH74jUyFpfsZ8zWmpPWRWTKiC6cS6Ph aLVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TVytv0a4cjMk9lrwtG4w8hPvQBP8qabYQWD39/Mm8gU=; b=dAs96YkgtLp9KKiJfRBAhJuJZhTn8xORSt1OOMz3p9t+6s+JvBmVHbNEXx/CIrPANV uIH4Ees05hiigS7AcV1jckqW4H37TIK1VTNXlSwHEASD+LMswLncAqadWuYuQa7kIvA6 oe4PCbuUBl3G9TaSghUcM2qKTCxbr2AogdzFiMRHByr3GIgJCFAzTi60FRwy9vp520jy bfs3ei6cpGMexB/VDg+byplpvAmkh5330jdwDqIRSS8S3LB7PrqWIPX0COCgbJuP/eTM 3m1E7GQ4Hv9XuTt01lBW4suLgZ4IvIWs9uCUu8zG3Wk75S9ptHudzLES1rs+SrH8g/c2 fGvw== X-Gm-Message-State: ACrzQf30HTBJt0djlnO9oAxZrsuSgbEenNGXqSNrTVT2j8cO24lDCx+U d7NydBJklj2U2S5/yheyspA= X-Google-Smtp-Source: AMsMyM7h3j7lBw6P3UcT3MebAx0tm0hSe/+8+oqDTLsFGlxUOaIpvN1t5Q1zAPo4F3CJOSGUKAn+yA== X-Received: by 2002:a2e:6a03:0:b0:276:c5d2:be6c with SMTP id f3-20020a2e6a03000000b00276c5d2be6cmr6454740ljc.104.1666675479878; Mon, 24 Oct 2022 22:24:39 -0700 (PDT) Received: from dc75zzyyyyyyyyyyyyyby-3.rev.dnainternet.fi (dc75zzyyyyyyyyyyyyyby-3.rev.dnainternet.fi. [2001:14ba:16f3:4a00::2]) by smtp.gmail.com with ESMTPSA id f7-20020a05651c02c700b0027718ee951dsm36222ljo.37.2022.10.24.22.24.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 22:24:39 -0700 (PDT) Date: Tue, 25 Oct 2022 08:24:24 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J. Wysocki" , Wolfram Sang , Akhil R , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] drivers: fwnode: fix fwnode_irq_get_byname() kerneldoc Message-ID: MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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 Signed-off-by: Matti Vaittinen --- drivers/base/property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {