From patchwork Sat Mar 3 11:47:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10256065 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 81E786037E for ; Sat, 3 Mar 2018 11:47:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DD74274A3 for ; Sat, 3 Mar 2018 11:47:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F3CB284AA; Sat, 3 Mar 2018 11:47:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC046274A3 for ; Sat, 3 Mar 2018 11:47:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751990AbeCCLre (ORCPT ); Sat, 3 Mar 2018 06:47:34 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:38833 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751721AbeCCLrd (ORCPT ); Sat, 3 Mar 2018 06:47:33 -0500 Received: by mail-qt0-f193.google.com with SMTP id n12so15075983qtl.5 for ; Sat, 03 Mar 2018 03:47:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=4EQ7+/41GhEFAmuKWcpCmjbXRGjZDiZZSZKbqz59KHE=; b=Kbt2ww9qqIiDH/ZVCjqYDgoV5CFqwN3GmsIaI1v/NF79MHX1N00ddUbr8dH3wFyk3/ MM9tuOoqNgF/zgtA5Til/UDyyfjOTVk3Dkf1EzEKVKYyB5qDnoQgCRx9yekORLciza0U 0q57C9WpNdUBqhme16JVoV0ysF1dYvEFhqiPBhseCRA8lURQhCwufE1TovYaHQ0Q15AF a861EVIIMYky3fod5U3oLd5IRSBpbDRy9hkR+gGew7HmcJCqDfYHE0cSMYU+Ik7S/D31 M7zqHpZ7Zon568jQdp6zmY0wW54a+hpo5rG5HstkswYws+/scE/R0gFPlsSozjEABbn5 YQWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4EQ7+/41GhEFAmuKWcpCmjbXRGjZDiZZSZKbqz59KHE=; b=fLfWc4OhBAY4m7ipRnDzATv1vUm5mJjHJ/UQfeXXCTrutZfvCylqkLGAwxC56Ul12b k+of/z4budnAMVoGqbhXCHMG47uiSK7bebi8K4QtG7pbWjiRKuWJslSVv9+inP4d4Xwq XcI2ywDdK3PHOKLfPLZw82WaL+RZdjuM5s71eKRpoI54OGb1sAj+UxSf1sdw10eFvf// jT/9fazpBwfa/WD10EbBIQrVsAza8k3WSJXDEuFY30GiomeUNE6R2HFkenLoCdBVUSYm B767ohnWdTSiuBO4FzgFuP/1fmp6aplZqEmshu6DDW1Th6HdsbK1zjIXvB3+iiY7r85N jfWg== X-Gm-Message-State: AElRT7FVloXPeM3C06OSzeVsyLLocseILqlPQNfMMvPJAaXSStD4qI/G wlV5xRsfnY9/JBEV/6zBo+M= X-Google-Smtp-Source: AG47ELt0sCZU2u2p282gQu26yKEK+qu72NQXtSgHQuSmPsYyQg2YF/ovm/wAZIUNy1ztNT1IFpV8PA== X-Received: by 10.200.20.14 with SMTP id k14mr12711279qtj.232.1520077652573; Sat, 03 Mar 2018 03:47:32 -0800 (PST) Received: from localhost.localdomain ([187.180.182.50]) by smtp.gmail.com with ESMTPSA id m3sm5715740qtg.57.2018.03.03.03.47.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 03 Mar 2018 03:47:31 -0800 (PST) From: Fabio Estevam To: mchehab@kernel.org Cc: slongerbeam@gmail.com, p.zabel@pengutronix.de, gustavo@embeddedor.com, linux-media@vger.kernel.org, Fabio Estevam Subject: [PATCH v2 1/2] media: imx-media-csi: Fix inconsistent IS_ERR and PTR_ERR Date: Sat, 3 Mar 2018 08:47:14 -0300 Message-Id: <1520077635-21464-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Gustavo A. R. Silva Fix inconsistent IS_ERR and PTR_ERR in imx_csi_probe. The proper pointer to be passed as argument is pinctrl instead of priv->vdev. This issue was detected with the help of Coccinelle. Fixes: 52e17089d185 ("media: imx: Don't initialize vars that won't be used") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Fabio Estevam Acked-by: Philipp Zabel --- Changes since v1: - None drivers/staging/media/imx/imx-media-csi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index 5a195f8..4f290a0 100644 --- a/drivers/staging/media/imx/imx-media-csi.c +++ b/drivers/staging/media/imx/imx-media-csi.c @@ -1798,7 +1798,7 @@ static int imx_csi_probe(struct platform_device *pdev) priv->dev->of_node = pdata->of_node; pinctrl = devm_pinctrl_get_select_default(priv->dev); if (IS_ERR(pinctrl)) { - ret = PTR_ERR(priv->vdev); + ret = PTR_ERR(pinctrl); goto free; }