From patchwork Sun Aug 27 16:30:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9923947 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 86A0360329 for ; Sun, 27 Aug 2017 16:31:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A2EA285DE for ; Sun, 27 Aug 2017 16:31:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F0CE28634; Sun, 27 Aug 2017 16:31:08 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 1C5B5285DE for ; Sun, 27 Aug 2017 16:31:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751249AbdH0QbF (ORCPT ); Sun, 27 Aug 2017 12:31:05 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:33695 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751182AbdH0QbE (ORCPT ); Sun, 27 Aug 2017 12:31:04 -0400 Received: by mail-qt0-f193.google.com with SMTP id q53so3499501qtq.0 for ; Sun, 27 Aug 2017 09:31:03 -0700 (PDT) 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=OcogcENeciZoSZycDFSsMcT0rYFU9QsQQug9yq4ex9U=; b=DznDXmfxD7KGpxDHoyW4pVZ3XStQajFWixU9671m7i76p+d4bPomLJI/1uLBcNlzDs /N8q+7v6/YFu52D/RzT2qSG5V1LeQu8XLhMxvkRE3evMufWLNFLYoQpH/YhPklHIneJa xYhcvZF035RDi0W7d1gvp9OEX/UJq96IQDcPJKR0YeQcg/uDPaDbXWM3IM6gsWij3TPI f5xUH0ShNG/n4zD6IiPG17z9BNOcojMBEy7oCr8xcFmniuGo1wXwRKv3LaPT4KtlsJhu ZXke880CFJa3kuslx2YbIsPXbiiUESOOI1rqUcdoat/2+TBfbde6QInb8qxPJ7GrWhpF 2QEQ== 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=OcogcENeciZoSZycDFSsMcT0rYFU9QsQQug9yq4ex9U=; b=dnKzH396u3NvU8QnOvtaBs/BONPnTjsXsc5v5Haxp9WuYYppRbkaonMl99eV1GM6yN 9B4wHzJG8SJUDbHCAO+9DG/bVYEe92YXgGRpfVxTYNPlK+3JVM8eEYVk0cc/8pBYTECB dKcyh07WArFBaU4J9DOGJn0oC8AYO9RweJEB6m0iL4uvLzOZTUrdxkBukxc3G6yhiRRI tzdcdeogT2TWMcEM7edEgKmEu/zwO3odmOqBC+bC468fTbQHrYLB6Q15R/AgI4Iy+th2 mnAv5KvklBD/s3BzA7G0yLA06xAwZStGnOY2DICM19IiGfcohJOwwADslmSPXX8CSF1M FxlA== X-Gm-Message-State: AHYfb5iAQxWQx9zMr5twzTgW2ceYtzZ6Pf5jbUWDsbrpiXyocwtVisuN +Bu4g8npUkhjOg== X-Received: by 10.200.62.9 with SMTP id z9mr2461927qtf.338.1503851463522; Sun, 27 Aug 2017 09:31:03 -0700 (PDT) Received: from localhost.localdomain ([187.180.183.214]) by smtp.gmail.com with ESMTPSA id f187sm6952640qkb.97.2017.08.27.09.31.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 27 Aug 2017 09:31:03 -0700 (PDT) From: Fabio Estevam To: mchehab@kernel.org Cc: hans.verkuil@cisco.com, sakari.ailus@linux.intel.com, linux-media@vger.kernel.org, Fabio Estevam Subject: [PATCH 3/4] [media] ov2640: Propagate the real error on devm_clk_get() failure Date: Sun, 27 Aug 2017 13:30:37 -0300 Message-Id: <1503851438-4949-3-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503851438-4949-1-git-send-email-festevam@gmail.com> References: <1503851438-4949-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 devm_clk_get() may return different error codes other than -EPROBE_DEFER, so it is better to return the real error code instead. Signed-off-by: Fabio Estevam --- drivers/media/i2c/ov2640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov2640.c b/drivers/media/i2c/ov2640.c index e6d0c1f..e6cbe01 100644 --- a/drivers/media/i2c/ov2640.c +++ b/drivers/media/i2c/ov2640.c @@ -1107,7 +1107,7 @@ static int ov2640_probe(struct i2c_client *client, if (client->dev.of_node) { priv->clk = devm_clk_get(&client->dev, "xvclk"); if (IS_ERR(priv->clk)) - return -EPROBE_DEFER; + return PTR_ERR(priv->clk); clk_prepare_enable(priv->clk); }