From patchwork Sat Mar 3 12:56:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10256083 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 9BF716037F for ; Sat, 3 Mar 2018 12:56:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8951828751 for ; Sat, 3 Mar 2018 12:56:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E16928783; Sat, 3 Mar 2018 12:56:48 +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 0518828751 for ; Sat, 3 Mar 2018 12:56:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751907AbeCCM4q (ORCPT ); Sat, 3 Mar 2018 07:56:46 -0500 Received: from mail-qk0-f194.google.com ([209.85.220.194]:41649 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751811AbeCCM4q (ORCPT ); Sat, 3 Mar 2018 07:56:46 -0500 Received: by mail-qk0-f194.google.com with SMTP id w142so15337590qkb.8 for ; Sat, 03 Mar 2018 04:56:45 -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=PWv5aVoiqNG9ujb7XTPxrOsshquoWahbPhTboc7EB50=; b=I+IXTksaSRh31Ab9uxx+mGAuQh2BVu0MJEKvFkjFo3T5ZC1apS3IQkXbnZ6m8AnQRn Z0QgUicKuM11qkkr55coSJv5CRYfwI0oaRmHyrqt+OY0MR9NZSVu7gqiG3QLzFksNSiG eE+j9NZNoAC/4e5LAXop+yXUnC9g/SpIlpmqX6l753ApuTnO++Nz/m4QYQFhs01N7L5L m3rW20gi7cAj20KkZmdVgFYI5KubsJhLaleAIRZ6rIu+P/wINatXUqu+6k0GfAcDP3hq Np5DovTqmLGHb8NanuGE3GTRjOEIH07op8s9QGuwPmjtVy322Q5CVu81o4mSjEQ4+ctR zkSQ== 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=PWv5aVoiqNG9ujb7XTPxrOsshquoWahbPhTboc7EB50=; b=ck7zdEBhAQmDu5ycXoO5A9E7/+P3+d87L/S96okKhzlHrK82NXYQqjsImEBzUDIoIf mTOA+ZLWbBgOBk6U7TaBZdjkGkaeKL/7DEl/QCdWvt0sADM/ONWxiBWDCSnejtS2QKnQ /5vZSeEGBf35u8dWddEOnLvXQlcNsTiZWZqAUNBgE7EnlYTtZZ2g9Tvq5eBciHr/0gh3 PgjlAi+rkzKGn49vZUrelNaeiXuBo+qfe+TdVMoXpiGTcKA3qbWuAI8Ld4NpiME+w6wL eeX73MtdLjRJW5/CooCeCDLCQfvlZiQqQ6xtIgv/YoZUzKjTO9yFFZ0wSQzTpdHdRIej /6MQ== X-Gm-Message-State: AElRT7E0ijpm++0N7yx69XhljNg9t0MetTSuwB4wwqNBI/fq8vXG1KgK 64/fs0dWjuBmSlN/RdYfRsw= X-Google-Smtp-Source: AG47ELvEMsH7yXld29f+oa9VKXB2/eKEL74Qtpzh31IuzXxQUOBYuQyZRD8gGl5JsXv4F8ZSzKbI9Q== X-Received: by 10.55.104.150 with SMTP id d144mr13121604qkc.71.1520081805303; Sat, 03 Mar 2018 04:56:45 -0800 (PST) Received: from localhost.localdomain ([187.180.182.50]) by smtp.gmail.com with ESMTPSA id e12sm2440917qtc.12.2018.03.03.04.56.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 03 Mar 2018 04:56:44 -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 2/2] media: imx-media-csi: Do not propagate the error when pinctrl is not found Date: Sat, 3 Mar 2018 09:56:30 -0300 Message-Id: <1520081790-3437-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520081790-3437-1-git-send-email-festevam@gmail.com> References: <1520081790-3437-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 --- Changes since v2: - Remove extraneous 'drivers/staging/media/imx/imx-media-csi.c' in commit log Changes since v1: - Add \n to the dbg message 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\n", ret); + if (ret != -ENODEV) + goto free; } ret = v4l2_async_register_subdev(&priv->sd);