Message ID | 1520081790-3437-1-git-send-email-festevam@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from <linux-media-owner@vger.kernel.org>) id 1es6iU-0005m5-Jc; Sat, 03 Mar 2018 12:56:46 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751896AbeCCM4n (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); 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 <rfc822; linux-media@vger.kernel.org>); Sat, 3 Mar 2018 07:56:43 -0500 Received: by mail-qk0-f194.google.com with SMTP id b130so15309139qkg.9 for <linux-media@vger.kernel.org>; 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 <festevam@gmail.com> To: mchehab@kernel.org Cc: slongerbeam@gmail.com, p.zabel@pengutronix.de, gustavo@embeddedor.com, linux-media@vger.kernel.org, Fabio Estevam <fabio.estevam@nxp.com> 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: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org |
Commit Message
Fabio Estevam
March 3, 2018, 12:56 p.m. UTC
From: Gustavo A. R. Silva <gustavo@embeddedor.com> 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 <gustavo@embeddedor.com> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> --- Changes since v2: - None Changes since v1: - None drivers/staging/media/imx/imx-media-csi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi, On Sat, 2018-03-03 at 09:56 -0300, Fabio Estevam wrote: > From: Gustavo A. R. Silva <gustavo@embeddedor.com> > > 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 <gustavo@embeddedor.com> > Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> > Acked-by: Philipp Zabel <p.zabel@pengutronix.de> > --- > 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); The second patch is applied now, but this part is still missing in v4.17-rc1, causing the CSI subdev probe to fail: imx-ipuv3-csi: probe of imx-ipuv3-csi.0 failed with error -1369528304 imx-ipuv3-csi: probe of imx-ipuv3-csi.1 failed with error -1369528304 imx-ipuv3-csi: probe of imx-ipuv3-csi.5 failed with error -1369528304 imx-ipuv3-csi: probe of imx-ipuv3-csi.6 failed with error -1369528304 regards Philipp
On Mon, Apr 16, 2018 at 10:16 AM, Philipp Zabel <p.zabel@pengutronix.de> wrote: > The second patch is applied now, but this part is still missing in > v4.17-rc1, causing the CSI subdev probe to fail: > > imx-ipuv3-csi: probe of imx-ipuv3-csi.0 failed with error -1369528304 > imx-ipuv3-csi: probe of imx-ipuv3-csi.1 failed with error -1369528304 > imx-ipuv3-csi: probe of imx-ipuv3-csi.5 failed with error -1369528304 > imx-ipuv3-csi: probe of imx-ipuv3-csi.6 failed with error -1369528304 Yes, this original patch does not apply against 4.17-rc1 anymore, so I rebased and resend it. Thanks
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; }