From patchwork Mon Apr 16 17:28:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10343599 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 73FA66039A for ; Mon, 16 Apr 2018 17:31:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 655D428845 for ; Mon, 16 Apr 2018 17:31:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A3C628847; Mon, 16 Apr 2018 17:31:05 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, 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 763C928845 for ; Mon, 16 Apr 2018 17:31:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752829AbeDPRbD (ORCPT ); Mon, 16 Apr 2018 13:31:03 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:38959 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752652AbeDPRbC (ORCPT ); Mon, 16 Apr 2018 13:31:02 -0400 Received: by mail-qk0-f193.google.com with SMTP id j73so17420590qke.6 for ; Mon, 16 Apr 2018 10:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=3orn5PvoMlFfKWVKMtA3QZ08owS+yn3Ors4sltBsvXo=; b=C4wLi57a2CLSTiPag2+lBM3/hydtSpX1oHHVMlM1uLDhlxy4wdcPNiSjrno8lwclOU Zmb9XBuXPET1roQOPCSYfeQ9a9xVvcIsn1Js/su/chxSjK0zIAHWK00ry815lN7vro9C fWZcfwXQ60+cv5KxKvm+aqQ1vvxzGZGrfbbaiMPZd/lDEsxhBgE6HtSa2xnyX3YpqP4l 3RGxmQTMGJIlyHUdfMXbBCrECq+U+aORdSwG0MZ2llpHc5ShY408J7KTyJR4OXw8X/me pQdtlbsgr7oAc64v5Wv/Gh8mWM/p/2wqNtwWnYNZ0sJ6VlxB50rMPN52f4ObecDpZXnk 5zvA== 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=3orn5PvoMlFfKWVKMtA3QZ08owS+yn3Ors4sltBsvXo=; b=h3mMNdzvtjwqL/v+0nt0Ua9e7HuwxID2k5BOdSpxN3N2mvEYZLHlazstZFxsMIyT0J YO2d4pIu3SH/3OfXjLqfJiX1B8mESotHeSMhgZPyjuEVMg4eCsTLYCFVf6Qv/2KeWrfh NbBVFDLVmc7HEiXWUqQTVr8aKSFWcVsz106QynLkXQphMQgtEfowbEMwHzh0V0SfKqPt pC1SJ6dCkxchz/GzhBTrZQvGgSHcxlRqVvB6tpp5+/9dG6droTmpWqjRCgFKt9b5ivDw zI7lKOsxKToL78st15w79yaW4ev/5F04y8he0ajsZuRENjjaZ89LaMQK4ZNgjyj/yluO 17LA== X-Gm-Message-State: ALQs6tCtrBrflKT4EczXlH5iQ4L+WBcyT1ZP6GSIHAzuBXV7J9pquIiT fQjEPW6lccDZEJ2Tv2z3ktNTew== X-Google-Smtp-Source: AIpwx4++L13KufMlTt8DzLu3A0Ak6eQBpXpNh4/giSHJaeoEvc5cwxSrEOUFLKV1eUFmvBfpPCWHbQ== X-Received: by 10.55.167.5 with SMTP id q5mr17591513qke.273.1523899862171; Mon, 16 Apr 2018 10:31:02 -0700 (PDT) Received: from localhost.localdomain ([187.180.183.211]) by smtp.gmail.com with ESMTPSA id s39sm10417667qts.43.2018.04.16.10.30.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Apr 2018 10:31:01 -0700 (PDT) From: Fabio Estevam To: mchehab@kernel.org Cc: hverkuil@xs4all.nl, p.zabel@pengutronix.de, gustavo@embeddedor.com, slongerbeam@gmail.com, linux-media@vger.kernel.org, Fabio Estevam Subject: [PATCH v2] media: imx-media-csi: Fix inconsistent IS_ERR and PTR_ERR Date: Mon, 16 Apr 2018 14:28:56 -0300 Message-Id: <1523899736-31360-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: 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 Reviewed-by: Philipp Zabel Tested-by: Philipp Zabel --- Changes since v1: - Rebased against 4.17-rc1 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 16cab40..aeab05f 100644 --- a/drivers/staging/media/imx/imx-media-csi.c +++ b/drivers/staging/media/imx/imx-media-csi.c @@ -1799,7 +1799,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); dev_dbg(priv->dev, "devm_pinctrl_get_select_default() failed: %d\n", ret); if (ret != -ENODEV)