From patchwork Sun Aug 27 16:30:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9923945 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 BBBE9603B4 for ; Sun, 27 Aug 2017 16:31:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC01028633 for ; Sun, 27 Aug 2017 16:31:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A11AD28639; Sun, 27 Aug 2017 16:31:06 +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 92D4928634 for ; Sun, 27 Aug 2017 16:31:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751243AbdH0QbC (ORCPT ); Sun, 27 Aug 2017 12:31:02 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:34030 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751182AbdH0QbC (ORCPT ); Sun, 27 Aug 2017 12:31:02 -0400 Received: by mail-qk0-f194.google.com with SMTP id a77so3598806qkb.1 for ; Sun, 27 Aug 2017 09:31:01 -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=WBYcWRDEhUByZY6TqXBYU7zzlpDfFIhrl8iNOORsgYM=; b=dnY/7FfdSrtK8IQpcREuvYyrHrE5ijMKNFMjhrqB5KZYEOLeM9xL4Br0Vchq+yNo4P +x6rM272/t6k8aO/BHEfFiQx/Mj5TcqURpZdLP67gwJVvwylH5PWgJgxNI+sVkfpctSL iKekeesGnPhZcYy7YlhmbBxpaqqD+nz6KgavEEKwYzCMt+9DY0GG3ZRE4csUsIrT36SQ 9HHj3sHyHYSPQdF9aGL6/LrCNz/VMt7d449Pczu1PgSgHRX16QOEDQY23nOBGMGnAaeL q+ZDOiIPfG+1L1ZsSnlNDpEntjTaF8FHEWeNF+uyGusllhxDAqj5+55uespOgq+NAAOz +Cdg== 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=WBYcWRDEhUByZY6TqXBYU7zzlpDfFIhrl8iNOORsgYM=; b=QFK7NuGa5+V61agNIyuMss4Z7Ma7chGpQVADFcyy6DB4kTe83nt+uq8EXZaBCJeHNU iQJgZ5dww5aisWaph3XJM1TMeqaOLBAUg3jwOPuRsFskxHPDHQ24IWse0qpZ6f/g/s6r aYnSpWmhaS6q8WVb57ZB/jg4CY/PszGrSf4EGOY7wUKHugWD65pu+SINEUtvEdke6b19 LcQ2673FXHXjrEG7gCtuLtfdkhw3oQgyHubaJctjgzX+57RLfmwtrPBvCR0hoQ7wV3Kt hlrZ5G4/zvm6qVbW0SYMTCYG8sH1XBODAjrntP/riISlNRnB6C49nD2W14cgKcYHNYRR vgVA== X-Gm-Message-State: AHYfb5j06zSBlPqyQLS7kCa4OVBGQAFuq3+s/M1A+ZwsrkVxar4SBr5d gNZ8TyfstdGx18oO X-Received: by 10.55.170.20 with SMTP id t20mr931769qke.201.1503851461441; Sun, 27 Aug 2017 09:31:01 -0700 (PDT) Received: from localhost.localdomain ([187.180.183.214]) by smtp.gmail.com with ESMTPSA id f187sm6952640qkb.97.2017.08.27.09.30.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 27 Aug 2017 09:31:01 -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 2/4] [media] mt9m111: Propagate the real error on v4l2_clk_get() failure Date: Sun, 27 Aug 2017 13:30:36 -0300 Message-Id: <1503851438-4949-2-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 v4l2_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/mt9m111.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c index 99b992e..b1665d9 100644 --- a/drivers/media/i2c/mt9m111.c +++ b/drivers/media/i2c/mt9m111.c @@ -945,7 +945,7 @@ static int mt9m111_probe(struct i2c_client *client, mt9m111->clk = v4l2_clk_get(&client->dev, "mclk"); if (IS_ERR(mt9m111->clk)) - return -EPROBE_DEFER; + return PTR_ERR(mt9m111->clk); /* Default HIGHPOWER context */ mt9m111->ctx = &context_b;