From patchwork Sat Mar 3 11:47:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10256067 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 10B2E6037E for ; Sat, 3 Mar 2018 11:47:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 005E0274A3 for ; Sat, 3 Mar 2018 11:47:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E93AD284AA; Sat, 3 Mar 2018 11:47:37 +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 8EA22274A3 for ; Sat, 3 Mar 2018 11:47:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751995AbeCCLrg (ORCPT ); Sat, 3 Mar 2018 06:47:36 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:37639 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751721AbeCCLrf (ORCPT ); Sat, 3 Mar 2018 06:47:35 -0500 Received: by mail-qt0-f195.google.com with SMTP id r16so15093832qtm.4 for ; Sat, 03 Mar 2018 03:47:35 -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=dcy21rlO67wABFyTqepK79ipseJEvq1nRDXUTrPknZc=; b=qh52ccbhAC8bWzM7QJnsuSajWBzs/qdT/25svevo6AohTSoOuGDcrB/xCNQ1p1hA+u GeHE8JlGNVApCjRA26+lZG2eKTxXHxsyGDaDcehyC3hfsmvzfLMMIiMdgKjBNvdUijNb +Afqvhu9AFIDyfXIOICLgPJ3SCCr4cUTazpOtVyIGXE5x/QGZW/i11+ZwBaCFRGTqkvG i5inL6kFZhiW/u1H0w0PomdJ+d5UYdgTxtRyeeCfyGE61bPRQ2wwHhrJSydDKBfZBFcF ZI0FiZsCdc18L1SnHmGMtaXo/FLSAzSy619uvQ5z1HQi9CDGS1PZTqMeWEzF/uXveIR/ yhIw== 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=dcy21rlO67wABFyTqepK79ipseJEvq1nRDXUTrPknZc=; b=dWHKP77dQOauJpvPscPN67roNQyRLgwpIxAc9Hst9FVgtkfcXyR1KabaTXhczgtMJO 1Sbu5WJD8YKc7gsp3Qsp2mZxrMjskS/EAGiTS/uaOCTOv8XtBtLeRGeuD+KCwHduRij1 rekMn9wbTSfSpe+nzg6Kcb3B8rGM/FEsxEuJSNkSU8x1p16aCkgEjopeZZ7ZjahzTJIc Phdjs/rmemzKncw0wg6VunbN28uWqPtc0ccJfAPCnVpMfuaLhqHUXonaCU6Ps3nV6Fnx PJ8SLQ0ysoXe55hzJi2ryA3GAAaAdOHr0v1tm4100t9lCZy3qyP9J1TAyQCMmSctKaZ2 o0cg== X-Gm-Message-State: AElRT7GWmwZJ7RAbcqwqZDS+Nx+U0I5je0sFlG4rXo2lhZMIINLVRzfg WRkAimy1QzNL9RNF/PVpZ1Y= X-Google-Smtp-Source: AG47ELsDEtI24KOEiHwO4/u5CCvXSuizhFyFTjD1Q/oVX4ZLipdtnfkhBYXcbheV0WufZ6365ceBMA== X-Received: by 10.200.12.68 with SMTP id l4mr13166772qti.71.1520077655064; Sat, 03 Mar 2018 03:47:35 -0800 (PST) Received: from localhost.localdomain ([187.180.182.50]) by smtp.gmail.com with ESMTPSA id m3sm5715740qtg.57.2018.03.03.03.47.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 03 Mar 2018 03:47:34 -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 v2 2/2] media: imx-media-csi: Do not propagate the error when pinctrl is not found Date: Sat, 3 Mar 2018 08:47:15 -0300 Message-Id: <1520077635-21464-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520077635-21464-1-git-send-email-festevam@gmail.com> References: <1520077635-21464-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. drivers/staging/media/imx/imx-media-csi.c Suggested-by: Philipp Zabel Signed-off-by: Fabio Estevam Reviewed-by: Steve Longerbeam --- 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);