From patchwork Fri Apr 22 10:45:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 565107 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 2F32CC433EF for ; Fri, 22 Apr 2022 10:45:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1446606AbiDVKsg (ORCPT ); Fri, 22 Apr 2022 06:48:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343946AbiDVKse (ORCPT ); Fri, 22 Apr 2022 06:48:34 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FA40286DA for ; Fri, 22 Apr 2022 03:45:41 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id y10so15543279ejw.8 for ; Fri, 22 Apr 2022 03:45:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HE//HcQTXFALh6mE2wSN/v3f/KXxXJCpEOZ5pIZr4hY=; b=e5/VJ4uwjeEhiUDjL6Ro+kDSkXiKb18cIXdxJsgc9MfJ3kSMHDqpOjVws7MfyYMItP l7dfyU48/9yznSA611fHOqCN5jmwFasrttXsMVnHGH3Go2SPSw/NDk38rF6BJJE3PA98 Q9aXDR+2Dy0BKEwHsrvGGCCXzDYQutoeQj13k43CJwL4OUox7D+BpQpErL2bzO4Y3RFa VbZlXOY0AGWAMIjskiP3aUih8nWm8F7mJu1CsC7IHTDBAn4O0X+jyEd2jPugwxq0LhSv 5XKQp9Ra8YQYIYnfrM5xSjVJ1p60b8uZvw/Lr8Ix0MjhKdOudMEt9tVV1c/zgzLaPBSv 5Wdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HE//HcQTXFALh6mE2wSN/v3f/KXxXJCpEOZ5pIZr4hY=; b=36ueyeEqSXRhJXZoJzyu1He87KgWosekIO79EoCpYKZks9mvZ4Z7v560ixsRVCbcyp igXc9lHBKphvYUg3EpQQu9BnJ2YX0B2HXQJGgEi/plITwiU9gfRDaR9Qk2UKq2Sglx22 tIfPsMUXzSDeu5Xcdp0IZHiTerajqSNFbDdetYjFRftBSf0iES+HnhenYy5DznyAGU7c r7TKJ/WV84qbbdaBnOMK5oBLIAXnEZFkPU5WslGCFqVMEG66GeGtorniFV9TqadUndd5 pIz1qwS5r0ROhVgOhq0ID4gOJnWmp675PKv++P/BASmeexZq4DlEplkQeTT9Rb2SW5fY BvbQ== X-Gm-Message-State: AOAM532n4ZZxoNMweDQCjb2omA/SrJIgJD1Xv+OM6ieTfCeRGSWI8Elk 6bUZ7HLYlOKOChOakcM9OZbG8A== X-Google-Smtp-Source: ABdhPJx39u9MWyPfP66DFZ7RmPDZDn+dQyvSAT/UY9njPtByzeZizvvoyz2vh1Iv+uTdK1xL8PcpXA== X-Received: by 2002:a17:906:2bd4:b0:6e8:7e5:39b6 with SMTP id n20-20020a1709062bd400b006e807e539b6mr3516862ejg.25.1650624340194; Fri, 22 Apr 2022 03:45:40 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id cn27-20020a0564020cbb00b00418b0c7fbbfsm744502edb.32.2022.04.22.03.45.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 03:45:39 -0700 (PDT) From: Krzysztof Kozlowski To: Brendan Higgins , Benjamin Herrenschmidt , Joel Stanley , Thomas Gleixner , Marc Zyngier , Andrew Jeffery , Eddie James , linux-i2c@vger.kernel.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/2] irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value Date: Fri, 22 Apr 2022 12:45:35 +0200 Message-Id: <20220422104536.61451-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO. Fixes: f48e699ddf70 ("irqchip/aspeed-i2c-ic: Add I2C IRQ controller for Aspeed") Signed-off-by: Krzysztof Kozlowski --- drivers/irqchip/irq-aspeed-i2c-ic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-aspeed-i2c-ic.c b/drivers/irqchip/irq-aspeed-i2c-ic.c index a47db16ff960..cef1291ae783 100644 --- a/drivers/irqchip/irq-aspeed-i2c-ic.c +++ b/drivers/irqchip/irq-aspeed-i2c-ic.c @@ -77,7 +77,7 @@ static int __init aspeed_i2c_ic_of_init(struct device_node *node, } i2c_ic->parent_irq = irq_of_parse_and_map(node, 0); - if (i2c_ic->parent_irq < 0) { + if (!i2c_ic->parent_irq) { ret = i2c_ic->parent_irq; goto err_iounmap; } From patchwork Fri Apr 22 10:45:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 565919 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 D34E4C433F5 for ; Fri, 22 Apr 2022 10:45:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1446841AbiDVKsh (ORCPT ); Fri, 22 Apr 2022 06:48:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386716AbiDVKsf (ORCPT ); Fri, 22 Apr 2022 06:48:35 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABA052A24A for ; Fri, 22 Apr 2022 03:45:42 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id y21so3037071edo.2 for ; Fri, 22 Apr 2022 03:45:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=E0mPDFRf2yGCYjXvBv/hrY8X7EKal2dOh8Gqauv0y1o=; b=hMffFfUZGHLuMf4xjuCqC0todGSD5kRTFeTjJ/Kiq1GvDKE7GYPQ3BHfEWcc0+BLRo zfNfU1rBTvTUXATzcYtX/G3CPWoziz3HoJYMc7cipZ/SWumhn3QqeoYtqqyMZlGr3WbV 56kHys/Ez8+9AqYfP78EOQGF8z5jZuNnJCl9IOPLFu2v/38oq2PZOFA9hlupunvO1zDY lTAjSXpPU5bqtAkqFbdpdHl3OJngGxgPeFSWr/RBrI33GnVBszAQEjEXLmiT8G1azlst xEuBRQlqa0Npblv/r4aiHrALyWxVk9RR5TE/8Addh8txKNshI89Vnr+oT6BqIuKRi4lA Kxzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=E0mPDFRf2yGCYjXvBv/hrY8X7EKal2dOh8Gqauv0y1o=; b=KiP+SdHmbimLgLYW7jw7/RGFwPHgTi6qvK5RKI2+6GmHQLQulxzINWE4iufpl8/V2O 1Zp8Rn3QwWqG8Q2pPXcFqfBTivzBeyu1LDPpM3L2jaW1vZ7v3jZaKYY/T98kxqq5hPXG y7PKz8MAIV0Kb82sqsTPhOYI1EBYSyMa+T8WMqjVn8omvsMco6nEpW7cLDaPRI3MbBBo y9XmRN++9O0LjLOTQwG57wcOYVokmUtoJ8VFUpB+iFqp36ao1VdcUk0cVDvxuPB+gbmb pv4Iwpd6+gF4bQx95OO/1aKObwin2yxRhTO8VaLNtWysIDNcleMUvD8Lb9Jg2ALQEYNB jQsg== X-Gm-Message-State: AOAM531+LPn6Ic3tPM0HQCM64+/vZecawIkCcK130AAwAVas3EHKBuz1 8C56y6b7jmLdZeWwRJGdOKPu/Q== X-Google-Smtp-Source: ABdhPJzJD/7be1sR2YX5lXMsY8HObXb/T1c5dQYSajPOBst6CqwP9QEnjh5GfF1c3sLUGXKVJ3qfyw== X-Received: by 2002:a05:6402:1107:b0:416:439a:6a9e with SMTP id u7-20020a056402110700b00416439a6a9emr4059032edv.382.1650624341298; Fri, 22 Apr 2022 03:45:41 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id cn27-20020a0564020cbb00b00418b0c7fbbfsm744502edb.32.2022.04.22.03.45.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 03:45:40 -0700 (PDT) From: Krzysztof Kozlowski To: Brendan Higgins , Benjamin Herrenschmidt , Joel Stanley , Thomas Gleixner , Marc Zyngier , Andrew Jeffery , Eddie James , linux-i2c@vger.kernel.org, openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org Cc: Krzysztof Kozlowski Subject: [PATCH 2/2] irqchip/aspeed-scu-ic: Fix irq_of_parse_and_map() return value Date: Fri, 22 Apr 2022 12:45:36 +0200 Message-Id: <20220422104536.61451-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220422104536.61451-1-krzysztof.kozlowski@linaro.org> References: <20220422104536.61451-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO. Fixes: 04f605906ff0 ("irqchip: Add Aspeed SCU interrupt controller") Signed-off-by: Krzysztof Kozlowski --- drivers/irqchip/irq-aspeed-scu-ic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-aspeed-scu-ic.c b/drivers/irqchip/irq-aspeed-scu-ic.c index 18b77c3e6db4..9cf67541828f 100644 --- a/drivers/irqchip/irq-aspeed-scu-ic.c +++ b/drivers/irqchip/irq-aspeed-scu-ic.c @@ -157,7 +157,7 @@ static int aspeed_scu_ic_of_init_common(struct aspeed_scu_ic *scu_ic, } irq = irq_of_parse_and_map(node, 0); - if (irq < 0) { + if (!irq) { rc = irq; goto err; }