From patchwork Fri Mar 2 19:14:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10255515 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 0F2DF6037F for ; Fri, 2 Mar 2018 19:14:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF11426E75 for ; Fri, 2 Mar 2018 19:14:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E2F8528210; Fri, 2 Mar 2018 19:14:28 +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 2BAFB26E75 for ; Fri, 2 Mar 2018 19:14:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426075AbeCBTO0 (ORCPT ); Fri, 2 Mar 2018 14:14:26 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:40791 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423640AbeCBTO0 (ORCPT ); Fri, 2 Mar 2018 14:14:26 -0500 Received: by mail-qt0-f195.google.com with SMTP id y6so13173792qtm.7 for ; Fri, 02 Mar 2018 11:14:26 -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=+bxbGuhz8r4zm0waQWwjY3oKoamCy3/QwA4fG5MdXGQ=; b=hMWaB3hqAmNjb74NnPHk0WX6sOvluR7TN67FYBoHz2s6lmkZV0SJfuJzio1g+x8osk GNKJ58SbJOmrvf6VcBu3DPtDzhO2i6z4PAbHCKbFV/QltGsjqb7/3503hdpby3HCRvlU 1kKIogYS1PTA3KLkeDWsfoxcfb+RSof4ixECwiSwPSurUIROweeLuZvnUCHpOEjIiog1 2wjubLl+kbjqUGU+sdQUpE7E8mrS1f/rdw9mAWzZQuLNJd8qHnGUi49lcNniObUNkfmf AP2zxaUY98QxKC/rE7uYgFeAWLOt1IlQDm84QqTrGNOvD2BrU9VyB4ag+rTO+dhd6BxY qJ+A== 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=+bxbGuhz8r4zm0waQWwjY3oKoamCy3/QwA4fG5MdXGQ=; b=pOxeREn5cKbeLmTaCSQYZA7LV6DjeaQ+ig2TVHApVJpHDQWMdgtk2OLDIuVTATdhM7 qxpLcrd6yMGcnFuGQvn6WgGmWEuRxUM2xjgE7rkt7nehAR3CG3F9K8CpcKPhAvbVeSUA urPwMGWzPxjxunBRSf9LBqNdn33ArcSbmYC8gR3j44XUpIcJuFGsl8nkFO//cDvl7S+8 iOnM0n1hBBed2EwMVxlqsFc2FHpO+/H3dY9nJzmG8U4EGLxSHcK12nrpU66W23QXr5l4 8B9ZlxDtBWWbdfp57nSqhVaIteKQeecelWhTtACFEjtwODSqJnoVrqt3/5wqDLLQQdF4 L+yA== X-Gm-Message-State: AElRT7HPIHDm+w0D65I+BfGwIYN4FMss6WAVdPjK4g2+2D1Of6X4oy3L duonTDXDHnxQ2QDc5yohMVQ= X-Google-Smtp-Source: AG47ELtaHfTtJk6Y82BG84/DIQXz7goBlHj9QAzJuHqb4Zti99bi+1C+W+1UnPbRjTaZVa0JvdmNCQ== X-Received: by 10.200.52.41 with SMTP id u38mr10023777qtb.172.1520018065545; Fri, 02 Mar 2018 11:14:25 -0800 (PST) Received: from localhost.localdomain ([187.180.182.50]) by smtp.gmail.com with ESMTPSA id r4sm5240620qta.61.2018.03.02.11.14.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 02 Mar 2018 11:14:25 -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 1/2] media: imx-media-csi: Fix inconsistent IS_ERR and PTR_ERR Date: Fri, 2 Mar 2018 16:14:08 -0300 Message-Id: <1520018049-5216-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 --- 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; }