Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp440329iog; Mon, 13 Jun 2022 06:04:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3FDtwUZUJq0QBlSm2yOHDsRl6ZyUID+T92JOxyLO0CSyj/idFoOXBPz1ISb1WWSQKTkJ5 X-Received: by 2002:a05:6a00:a06:b0:51e:47f5:79ad with SMTP id p6-20020a056a000a0600b0051e47f579admr23416946pfh.53.1655125260933; Mon, 13 Jun 2022 06:01:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125260; cv=none; d=google.com; s=arc-20160816; b=gS2iszSnv6LyAvMZZkAxUl4jgwp85jNOjRkHGcar90VgVHNh+I/TluM98XtphTh/6y 6ZCWBPyptXFiV5CeL0XGsDHHIY31YqFw3r+9JKMSfgMoI4vbb/NL23xwW61hNoZGTSP+ dpfFRpbHruCE9CL10ztdWKSlm8tH6Sp/opAVdtlgw3ds7WTWLhRRn4mS3bgm8AvjB3jn 3LBYMn3EiEThSyJDLgI2O06Uc+pNpd4aOAtx4Yrg3CZ+SyMAiHuBTKHtNnEBU20mWqGH E5oJ7CXgYucO0yHWmSbs5b5hRqeMnEA3iViqkRW3PdUOc891XTOKIglwAQxJiQzOJDlL mPpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6Nt1d5Ca7nDC3iowHNFE9uY49yNip6GQqGVAQQpFmds=; b=xh/Nl0GPN4+WjYX5ofKOX46g4ImOSSyKA2usfSq8wpsWhzIOH0+zUaId6sOcuitkYD ROeojqsQ50tIG/AeyJM34+REfgEJPtTS+o+rnbKkm44G80sNn2jao6zzNk8MJ32UAVik IWVHhSbjZhH7/4xI35BV1je4ZolEw/jeGjNjesQnvVYIXGgTgNznL07tvt++Fu0A9hLU j/RKWNsInoEEHi2WNmpmqvRgCsoQ+6s0LozYMp7fiN5vUQBUrWBef9DtuKvn/g8Q6eqp nOBtblmCDJ0BbIx8hp0zl4Qsi216spKNjHePNK0LHXCH724W4e/PnJachO06w6CfSRW1 Tnjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="fID+/4v0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y64-20020a633243000000b003f5ccb17340si9834153pgy.571.2022.06.13.06.00.43; Mon, 13 Jun 2022 06:01:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="fID+/4v0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355801AbiFMLjk (ORCPT + 99 others); Mon, 13 Jun 2022 07:39:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355161AbiFMLat (ORCPT ); Mon, 13 Jun 2022 07:30:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30B2B4133F; Mon, 13 Jun 2022 03:46:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C3D7861257; Mon, 13 Jun 2022 10:46:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3CF3C34114; Mon, 13 Jun 2022 10:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655117199; bh=HV73AQN1kNcjmqMkArhjy0PLs8x/DcI7HaSRZwf/Jeg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fID+/4v0cEDF2mbdUI0AGv6CHlIJzBag3RfXG8f3fE3BDi9bl+bP9+mORCvbdLfx7 suD5TScbDx4GLWbtdFO4qcihzjtoWRpY9SeP/kr4UQ8pkDcKx8F1Un5VDEjLo7hiXd xO/z2M9/jEue4ux0sAVn2JNQNp77MgzHzfCPjEbs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krzysztof Kozlowski , Neil Armstrong , Daniel Lezcano , Sasha Levin Subject: [PATCH 5.4 321/411] clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value Date: Mon, 13 Jun 2022 12:09:54 +0200 Message-Id: <20220613094938.359979991@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094928.482772422@linuxfoundation.org> References: <20220613094928.482772422@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Krzysztof Kozlowski [ Upstream commit 9c04a8ff03def4df3f81219ffbe1ec9b44ff5348 ] The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO. Fixes: 89355274e1f7 ("clocksource/drivers/oxnas-rps: Add Oxford Semiconductor RPS Dual Timer") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20220422104101.55754-1-krzysztof.kozlowski@linaro.org Signed-off-by: Daniel Lezcano Signed-off-by: Sasha Levin --- drivers/clocksource/timer-oxnas-rps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clocksource/timer-oxnas-rps.c b/drivers/clocksource/timer-oxnas-rps.c index 56c0cc32d0ac..d514b44e67dd 100644 --- a/drivers/clocksource/timer-oxnas-rps.c +++ b/drivers/clocksource/timer-oxnas-rps.c @@ -236,7 +236,7 @@ static int __init oxnas_rps_timer_init(struct device_node *np) } rps->irq = irq_of_parse_and_map(np, 0); - if (rps->irq < 0) { + if (!rps->irq) { ret = -EINVAL; goto err_iomap; } -- 2.35.1