From patchwork Sat Mar 3 12:56:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10256081 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 6C32A6037F for ; Sat, 3 Mar 2018 12:56:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F33C28751 for ; Sat, 3 Mar 2018 12:56:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4291128783; Sat, 3 Mar 2018 12:56:46 +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 B553228751 for ; Sat, 3 Mar 2018 12:56:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751896AbeCCM4n (ORCPT ); Sat, 3 Mar 2018 07:56:43 -0500 Received: from mail-qk0-f194.google.com ([209.85.220.194]:42853 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751811AbeCCM4n (ORCPT ); Sat, 3 Mar 2018 07:56:43 -0500 Received: by mail-qk0-f194.google.com with SMTP id b130so15309139qkg.9 for ; Sat, 03 Mar 2018 04:56:42 -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=sA925eDoQmFypTYxc2duK+TTfPtT+1ZxbE5WtFjAhWs=; b=SREF4fZLgc2AN0x07H+phHlRKT56AI7HyBRCaZbi1Y03J6v6ZXT+YrqHk3kLW2gvpi ZW5FVEgTin73X6lLS96mGNm0rExelqUtqfmDakGwxBvXnrB+ktwao/4E0jb7coLxqCQm q2GtJEq0oalduMW7MAAEO6GqdL8NUCJUQ8PHg9XRqoej9tNgX/PBWdfvDbCEbdaILXOi YQVQog2soUGeZO97HXxYzk8uFb3aCs8vfEpZad5vVbWehhPWYV+BHAtVDefFKdMftc5V cys8LWo8YoWUvEvDbvk3Wxc6fT9Vhipnu/OEwjrnD757zjEi5yXmWpjCB8VU3fMST1Xg 2HJA== 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=sA925eDoQmFypTYxc2duK+TTfPtT+1ZxbE5WtFjAhWs=; b=I7INBSoWVE37LR1FOLFgEL15nlMLsIdfEyFgw3k9hFeCmHr++lfigDI8xOODq/XkwW r67+CMtyw1VUqVAG1gOBUF3za5nCvr2+fxeAIzsgBrfA0RB76RJlBoXNgwdgA2JCXbs0 A32paGTTmyRH3joxZoi9h9fzJUDGOIazKnd9odWE3TBgAf418HE1c/MYv1MSgsXxBddg sbKTelbedpwo/Go4VK3YkDTHVrXlkzBSg/yw1a6TQUUHGqzJyICKh+yUxFRtiAouBnC5 EatdO641C9PhbE/zyoemjAYiRf2H4GkS3foUoWynyy+QvbEQXSITJ6zpPw367ax9/9Wc 0qwQ== X-Gm-Message-State: AElRT7EoOc7WCDG6v9RbkBN7EbumoW/678BVwzqPbnaQWwpgcey+5z/q xKmfDR8+LCeFuHgSKW1tXvo= X-Google-Smtp-Source: AG47ELt6Iie9z3K9YETFvx+qWyvTjaF+DsWk4oJF8RTab17ScHXY1y5iU0uhEwdYKuENdtQPTRbAbQ== X-Received: by 10.55.109.196 with SMTP id i187mr11936092qkc.29.1520081802282; Sat, 03 Mar 2018 04:56:42 -0800 (PST) Received: from localhost.localdomain ([187.180.182.50]) by smtp.gmail.com with ESMTPSA id e12sm2440917qtc.12.2018.03.03.04.56.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 03 Mar 2018 04:56:41 -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 v3 1/2] media: imx-media-csi: Fix inconsistent IS_ERR and PTR_ERR Date: Sat, 3 Mar 2018 09:56:29 -0300 Message-Id: <1520081790-3437-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 v2: - None 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; }