From patchwork Fri Mar 2 19:14:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10255517 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 11BF26037F for ; Fri, 2 Mar 2018 19:14:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00F4E27CEE for ; Fri, 2 Mar 2018 19:14:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E95472823E; Fri, 2 Mar 2018 19:14:30 +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 8892E27CEE for ; Fri, 2 Mar 2018 19:14:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426234AbeCBTO3 (ORCPT ); Fri, 2 Mar 2018 14:14:29 -0500 Received: from mail-qk0-f193.google.com ([209.85.220.193]:37170 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423640AbeCBTO2 (ORCPT ); Fri, 2 Mar 2018 14:14:28 -0500 Received: by mail-qk0-f193.google.com with SMTP id y137so13270048qka.4 for ; Fri, 02 Mar 2018 11:14:28 -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:in-reply-to:references; bh=1+/Ul6487TU3ig7/GOxhdZGgI+9nxc8aELkBnkg/kY4=; b=THUhxgf1mmC7ouHpCrNWTcUgyajjob72A1hlSpRj41jiObSfpn+M4Bnq7dpg/SWMcH AaSvOrnfmOd7y/xUct1QNrnb+XsqSu51eeNkoC9eXyOg+Dsp86/GwkTmWJKC60+xENoK cvzAUCR12wq56mSg+ejmI8YbZby+8LXSrUQxvyawpLTk+mYZeyoiTuZpghRTTlW07CAx Pd34xhwqkod4ubnH6K+HA0s5YDgBe4U/H69N0JUV5DRXRkWsbmPGjdFaPFvuIE3vubFd woSU9x9scRRgmBmQNwnlOsLHL+mRN8w/LZJhPUk9v1PI3EYS3Ij7XNzMr63ikL3/Nnpu U6yQ== 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:in-reply-to :references; bh=1+/Ul6487TU3ig7/GOxhdZGgI+9nxc8aELkBnkg/kY4=; b=CLtfMFPe1t+zXs3/bVK99z0y3tui2etCVn2hzgnU34fvH+AdqFqAAKCIfHW0Dfpvw7 jTOGvzz40tGgNaBUqD2l5O15F8p/tKBYRmlS0N1wZmx/LHMvJjJIpDRfnNWNb68SDKbp o5iKKsCuT4Ilwxm3QrkPDzm9ndnsPtIR/fCqAokORrmO4llWQ/OneewF9ecRy5N/OkkG F4QZeSpCDS0Nv8sC472MLSPyVeAhP4KzjyXNwZlpwgx5D2WV/FxBXI2cMOVdDdT0W7aT YMkQ6gkz3t4hvGV308ssFkMbiehuRlf0a3H2JPF0VQnFOTeetBdJ4gKsK0DnUutrUKWp LCrA== X-Gm-Message-State: AElRT7HbKQNIGFDhSwcXBYofWPGTkJHyoP5eJPej5LEMMtvAYBSWSl/j +Ya7eAU7mcI3FNoL3agr4lY= X-Google-Smtp-Source: AG47ELvyK7UaUeQKSGpz91d20hnklspBzpXwrnYgHh1UZBBVS+Ek8XICIqkQrPlV7d6RNaVm1fe0ow== X-Received: by 10.55.168.212 with SMTP id r203mr9410101qke.257.1520018067940; Fri, 02 Mar 2018 11:14:27 -0800 (PST) Received: from localhost.localdomain ([187.180.182.50]) by smtp.gmail.com with ESMTPSA id r4sm5240620qta.61.2018.03.02.11.14.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 02 Mar 2018 11:14:27 -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 2/2] media: imx-media-csi: Do not propagate the error when pinctrl is not found Date: Fri, 2 Mar 2018 16:14:09 -0300 Message-Id: <1520018049-5216-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520018049-5216-1-git-send-email-festevam@gmail.com> References: <1520018049-5216-1-git-send-email-festevam@gmail.com> 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: Fabio Estevam Since commit 52e17089d185 ("media: imx: Don't initialize vars that won't be used") imx_csi_probe() fails to probe after propagating the devm_pinctrl_get_select_default() error. devm_pinctrl_get_select_default() may return -ENODEV when the CSI pinctrl entry is not found, so better not to propagate the error in the -ENODEV case to avoid a regression. Suggested-by: Philipp Zabel Signed-off-by: Fabio Estevam Reviewed-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-csi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index 4f290a0..5af66f6 100644 --- a/drivers/staging/media/imx/imx-media-csi.c +++ b/drivers/staging/media/imx/imx-media-csi.c @@ -1799,7 +1799,10 @@ static int imx_csi_probe(struct platform_device *pdev) pinctrl = devm_pinctrl_get_select_default(priv->dev); if (IS_ERR(pinctrl)) { ret = PTR_ERR(pinctrl); - goto free; + dev_dbg(priv->dev, + "devm_pinctrl_get_select_default() failed: %d", ret); + if (ret != -ENODEV) + goto free; } ret = v4l2_async_register_subdev(&priv->sd);