Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4178529pxk; Tue, 22 Sep 2020 12:18:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHBzNZcDq1ZMTKUW2x3T9U7AQJ9+G2NdppqnVPcuEOuKek77iM3cgz3vDER8d7DEtopsi/ X-Received: by 2002:a50:8e58:: with SMTP id 24mr5721354edx.226.1600802288391; Tue, 22 Sep 2020 12:18:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600802288; cv=none; d=google.com; s=arc-20160816; b=RIJpDNc8xtxhxN9g0wqXpOA2wGjbjs/rhwoJSQ/T1CPdUwyYI1Ek1TZZGPzPtqgcCm YlxqL1M1iecJr6h/x9sFupl/U4O8/7gsFfMolXYOK4P3tx4HYNiatSNQrtOq3vFjIcs1 ZqLIjzw80S3STEzlj4z62MGh0Nt3Lwzgte1Dl8+Tz64nxKir2ycd8oNlufWVawejwna/ KRBot0144Oy9ze1nexMT4oyGGIAdHDzLIS14eAL9eEJSMlU+TTCSxig9ImDZfUjOKjdS X9pXmuswmv998crMTTVv+7MntVUwWEWiv1cUfYq3PP6Fk5lHu7TlC2BFOCRyX66QDMRn jPqQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=G/k+TaQK9cXr1Knu4kd8q4mHdnbvXH0c5k1V8nLBW6I=; b=TJ4dbwJMX60d95dsaD1vZVxizQcWAgVF9dEEP485Dt9wk/OQMdAHO9i1g/bDWZ+XwX IzhrL+lN3oK2Am9HEcMI72WkJ7lixWi9Kgk4rbxSZGMH99PFsW7IxwJcYMTpwk9eXDrf nFer58sgtkP6l08V/WbM2FCQmY1LKt7z87izlsUbN8QfBQNAbFr0cqQiT7PX65mnxUdP 2mlTQhpLw8jQfcLGL9/38x3BgcXDJie/BABLlcjaeSE7rDZoKmQRXAzbF/qfJgonxGgb wiadwdPJfKf01aF7lMhaHIuPQSXcejXNvvBB+SJ4/L0RINpyYE4aA6QN5boBWVBzWaBa WQWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sPqHsK5x; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si11520164edx.502.2020.09.22.12.17.43; Tue, 22 Sep 2020 12:18:08 -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=@kernel.org header.s=default header.b=sPqHsK5x; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726709AbgIVTQm (ORCPT + 99 others); Tue, 22 Sep 2020 15:16:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:58256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726641AbgIVTQm (ORCPT ); Tue, 22 Sep 2020 15:16:42 -0400 Received: from mail.kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 34713206FC; Tue, 22 Sep 2020 19:16:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600802202; bh=xFAegshdal4oOFaZe0xOh2NNgkqPJPvZzLl0b11jFcw=; h=From:To:Cc:Subject:Date:From; b=sPqHsK5xTBVlrFS5V8D8Wi7xnOOszj7cfZKZAUpMFKFHJYJO+CoJxpfvQJ2l44+W4 HktAjslwLIrurrpF1cgwjH6Ut/AVl+/sN3o0E/WjGTL3d8OCtxPV7OGXZfrrm6zTWc BWYJPnWpg2oYkKk9Lb/DRhYboZ0my/m5MGUmhEpw= From: Stephen Boyd To: Michael Turquette , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Joseph Lo , Thierry Reding Subject: [PATCH] clk: tegra: Drop !provider check in tegra210_clk_emc_set_rate() Date: Tue, 22 Sep 2020 12:16:41 -0700 Message-Id: <20200922191641.2305144-1-sboyd@kernel.org> X-Mailer: git-send-email 2.28.0.681.g6f77f65b4e-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The provider variable is already dereferenced earlier in this function. Drop the check for NULL as it is impossible. Found with smatch drivers/clk/tegra/clk-tegra210-emc.c:131 tegra210_clk_emc_set_rate() warn: variable dereferenced before check 'provider' (see line 124) Cc: Joseph Lo Cc: Thierry Reding Fixes: 0ac65fc946d3 ("clk: tegra: Implement Tegra210 EMC clock") Signed-off-by: Stephen Boyd --- drivers/clk/tegra/clk-tegra210-emc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/tegra/clk-tegra210-emc.c b/drivers/clk/tegra/clk-tegra210-emc.c index 352a2c3fc374..971c919b2994 100644 --- a/drivers/clk/tegra/clk-tegra210-emc.c +++ b/drivers/clk/tegra/clk-tegra210-emc.c @@ -126,7 +126,7 @@ static int tegra210_clk_emc_set_rate(struct clk_hw *hw, unsigned long rate, unsigned int i; int err; - if (!provider || !provider->configs || provider->num_configs == 0) + if (!provider->configs || provider->num_configs == 0) return -EINVAL; for (i = 0; i < provider->num_configs; i++) { base-commit: 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5 -- https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/