Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1232269pxf; Fri, 9 Apr 2021 03:29:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpOCcDpcAlDYBOtF7O1NpY8WcdTEh6TyN75IPwhmbc8dt/2ovLUa/Mh56PpsCq+htODjcc X-Received: by 2002:a05:6402:148a:: with SMTP id e10mr16670645edv.377.1617964179494; Fri, 09 Apr 2021 03:29:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617964179; cv=none; d=google.com; s=arc-20160816; b=Hz9BBQNqq1Sg9HrOmPTSAAzVWpG078vBBzyxqt+kUxe20CTuOz3NiteXXb8150X1QJ MXtA2qWmEKP4dlicpYRhuLhtOwX3OyAnySxtBTX6hF35izCSXNZGlg3+IEqEMgmOkRNH My9VUcQ/m+v/Z0bc5/tfwdIkDTCCwOtzNdlSoC0wIHsQGxrPTsoPGEyzu88PSxjtdfw9 rd/TAcB5HBbgUHiR2Sl5ReYnAt59DoDQWN4HrdGvDI6Og/liQeTOmO5rVNZBTjjarm7H A2iTpr0IT3RkoHhfKt80R6PsQcNnfQwxvoJBLIAI2qR/t5lLtBEAZGmaEHddFBkybzQR HFsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=RpXUcJFVAbPv/enfIYWxGxieQKnrqvTMi8i/syVswnM=; b=L+9q8oeoa3oC5S1ENomlPVZrynnqLRpF4hjej/Kstfyf059LSm0pOZZGjmKkiBRn16 n3MmGGh7Ruk64DObPw+XFQtxwJekdq0TO7EQRmhC2vZAmAN8+8KdZwO84mljCQ6ZrCIQ 9DoqLoWX0XEKugvv1yWB1iUzbAfb7MLeASx4PGM+X5y7FkO5/BGNbKOowLPgPRWz5e83 IF8UzixW0BbegftWG2NlF2XQZf8Qhk/y39UM9DwC/xsk4C3rq68CLXcZ7srR53NvP207 asTVbQU9+rCFKNwbMlG+R3FoL023XN9fXtjEMaBhGuH29nmzVRq9I48rmiX0S704wQA7 Fx2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=e2KcTvPb; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=Db2l2ov2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q2si1673757ejj.541.2021.04.09.03.29.16; Fri, 09 Apr 2021 03:29:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=e2KcTvPb; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=Db2l2ov2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233647AbhDIK2P (ORCPT + 99 others); Fri, 9 Apr 2021 06:28:15 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:49638 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232813AbhDIK1n (ORCPT ); Fri, 9 Apr 2021 06:27:43 -0400 Date: Fri, 09 Apr 2021 10:27:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1617964047; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RpXUcJFVAbPv/enfIYWxGxieQKnrqvTMi8i/syVswnM=; b=e2KcTvPbHvuw1znuKvbC/CktR2yLO/ubmyBVlNZtVOps8hAcOeSg3pACIUXC1/8bwdrGvm XFMgadclIFk7mIFSD0u4qGFQzCcT/oL5fJ0NCSmq1G8WEw+6nTdRmMn7o4cNyaQDIynLkq WLCBrqb1J5iWHf45AwhfZUHqGs/PVugTDc63XllnaK322vL26+gJ8DRUBiDZ0cw6fNuZCf Lc6nnbRXTQ0KW8RhINxzyR0NXZ7IH4d5IolJG7YeeYgBoGqK1bUczFjlJYGuJq8K7cflpW FNM7hXw0DYwarhUSOBq5pWG6QYiovISEQWqQe4+Ekf32OfEc01GMs6oRLzoouA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1617964047; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RpXUcJFVAbPv/enfIYWxGxieQKnrqvTMi8i/syVswnM=; b=Db2l2ov2zCMOWjI26oB8mhjPvXo6LypLodWBR38EwJB/5mLYCm7752yND5b/sSsuOIZItT GRu0FnlFZnF54TBg== From: "tip-bot2 for Wei Yongjun" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] clocksource/drivers/ingenic_ost: Fix return value check in ingenic_ost_probe() Cc: Hulk Robot , Wei Yongjun , Daniel Lezcano , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210308123031.2285083-1-weiyongjun1@huawei.com> References: <20210308123031.2285083-1-weiyongjun1@huawei.com> MIME-Version: 1.0 Message-ID: <161796404735.29796.5865943539504104634.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the timers/core branch of tip: Commit-ID: 2a65f7e2772613debd03fa2492e76a635aa04545 Gitweb: https://git.kernel.org/tip/2a65f7e2772613debd03fa2492e76a635aa04545 Author: Wei Yongjun AuthorDate: Mon, 08 Mar 2021 12:30:31 Committer: Daniel Lezcano CommitterDate: Thu, 08 Apr 2021 13:24:15 +02:00 clocksource/drivers/ingenic_ost: Fix return value check in ingenic_ost_probe() In case of error, the function device_node_to_regmap() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: ca7b72b5a5f2 ("clocksource: Add driver for the Ingenic JZ47xx OST") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210308123031.2285083-1-weiyongjun1@huawei.com --- drivers/clocksource/ingenic-ost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/ingenic-ost.c b/drivers/clocksource/ingenic-ost.c index d2d6646..06d2575 100644 --- a/drivers/clocksource/ingenic-ost.c +++ b/drivers/clocksource/ingenic-ost.c @@ -88,9 +88,9 @@ static int __init ingenic_ost_probe(struct platform_device *pdev) return PTR_ERR(ost->regs); map = device_node_to_regmap(dev->parent->of_node); - if (!map) { + if (IS_ERR(map)) { dev_err(dev, "regmap not found"); - return -EINVAL; + return PTR_ERR(map); } ost->clk = devm_clk_get(dev, "ost");