Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp719365ybj; Thu, 7 May 2020 06:11:03 -0700 (PDT) X-Google-Smtp-Source: APiQypLAlUg6orUW0VrimNlPrEJSUx6rV01Y6CICFBQCYLZO1aQtX4NexHV335pL8Q63Xaf6HaJH X-Received: by 2002:a17:906:6441:: with SMTP id l1mr12261495ejn.148.1588857063472; Thu, 07 May 2020 06:11:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588857063; cv=none; d=google.com; s=arc-20160816; b=oCeckh1QDKwwkRe7s3d9ifjtBM701pZuWt8S8/S11VZ1YengGMXib9Z2zMNQSzV7jz mCZjDprY9PXFTu3nfb7O+3KiEaC2Yp6U80mjYZ1UmCL6nCpZXGjtNKz+A6pKmDYBpUKC kitbHkfi4xzz3GK5iDcdyY1Herve6oYGiMzsVRyqqmEweFL451iX6uHkoz82L6Owqn2H oxpj/hITHUU8aVOOnG6CelWJViIGRrwXcakv1fbNfV8KP0ii6lpcnJIZUXdW/SfaqxZk oWkycuor6V/VrKtYanQtXs/+o+v5HN22vyBGWOD/SmXo72LSr53uipnBHdH3EvJTlI0z icWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=h+uVuGZ+YzvAY7q+qAIIUl2M/j5WxEdIw1ZLvxLNEZo=; b=OMRn/BSTLcTeKTOuEb3dlEIxSMPjlaxULrvHUY/sBQx74eLArCG0ZAY6GXO/P2zrdI O55vBb9tQ95z9ySOsVwotane8D+lRd/IH2Q54RjhUiV75DPftSOBSBC07sk4qVFDI2kl pFkCrZvCthmWyL/I5vNpdNljrp+srwNLxyWNhQsRu4Oy+nCHTUp1gzgDWxaPvmUBg4WA Y+6D3vNjDXURtyhD0E40PZGU1VR4VBXTtcCRoRiBaG58Oh8yTa6sGDpfW3z3KAVg/ine X9stxv/cqenVp3/Zh8JWAAwvB1hCjCY8R/F/fi0nivfm0/dNDtE320i+KThlKWqdYToG zyPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=N5IeqxL+; 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 x22si3041597eju.478.2020.05.07.06.10.34; Thu, 07 May 2020 06:11:03 -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=N5IeqxL+; 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 S1726451AbgEGNIV (ORCPT + 99 others); Thu, 7 May 2020 09:08:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:43762 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726350AbgEGNIV (ORCPT ); Thu, 7 May 2020 09:08:21 -0400 Received: from embeddedor (unknown [189.207.59.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BA11F20870; Thu, 7 May 2020 13:08:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588856900; bh=iF9jX+7z7ru6HD3PxDGP0QqjiXkokdLrWTYirF4yg5o=; h=Date:From:To:Cc:Subject:From; b=N5IeqxL+pm8uG+ioRyFmDRt8nvD6Ms5+PVbFa6RD5tUdKaFlFkKlV8vD6QEgLDVkk CM0cW36Z2FJX85xm9lHWd8pgla8pR0nbjoKHVIyHxmlxsQg0UjH7gSA8QBLPcGlS40 amaw0LrBuHVZAyyr2YTyFaT7VE+NwlupSVpFf6Z8= Date: Thu, 7 May 2020 08:12:45 -0500 From: "Gustavo A. R. Silva" To: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Leonard Crestez Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] PM / devfreq: imx: Fix inconsistent IS_ERR and PTR_ERR Message-ID: <20200507131245.GA709@embeddedor> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix inconsistent IS_ERR and PTR_ERR in imx_bus_init_icc(). The proper pointer to be passed as argument to PTR_ERR() is priv->icc_pdev. This bug was detected with the help of Coccinelle. Fixes: 16c1d2f1b0bd ("PM / devfreq: imx: Register interconnect device") Signed-off-by: Gustavo A. R. Silva --- drivers/devfreq/imx-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/devfreq/imx-bus.c b/drivers/devfreq/imx-bus.c index 532e7954032f..4f38455ad742 100644 --- a/drivers/devfreq/imx-bus.c +++ b/drivers/devfreq/imx-bus.c @@ -88,8 +88,8 @@ static int imx_bus_init_icc(struct device *dev) dev, icc_driver_name, -1, NULL, 0); if (IS_ERR(priv->icc_pdev)) { dev_err(dev, "failed to register icc provider %s: %ld\n", - icc_driver_name, PTR_ERR(priv->devfreq)); - return PTR_ERR(priv->devfreq); + icc_driver_name, PTR_ERR(priv->icc_pdev)); + return PTR_ERR(priv->icc_pdev); } return 0; -- 2.26.2