From patchwork Fri Aug 21 16:16:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 7052581 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 66FF29F4F5 for ; Fri, 21 Aug 2015 16:17:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B07A20571 for ; Fri, 21 Aug 2015 16:17:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B488D205D4 for ; Fri, 21 Aug 2015 16:17:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751402AbbHUQRK (ORCPT ); Fri, 21 Aug 2015 12:17:10 -0400 Received: from mail-yk0-f176.google.com ([209.85.160.176]:35762 "EHLO mail-yk0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751302AbbHUQRK (ORCPT ); Fri, 21 Aug 2015 12:17:10 -0400 Received: by ykbi184 with SMTP id i184so75140188ykb.2 for ; Fri, 21 Aug 2015 09:17:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oH95ViNLarM1Edg3lix1lz0eNviEUAfA5UTMMB/DWCI=; b=F0XPYQJLBcU2OGTCDJvnqW1hZr67MI/LgyGD3Z8+FV9aXwj3EKQqS8AF0YKBC3jyPc M5saeToyFt6WbbUww9z7imDcVSz7o4h9odp/6NLuaLYt/JEGFFR0BwkWg2SJMN8TFM11 y6+Zd8PHBm2W9hIyuOZpxTeBpS77+rk6Me7RCNLJyjWdy8FLvCiXcuAqmp7DiM3QGia/ d99oFqL4w+bGbkyCHCrbVh6a+hC4lMhTtYBBKdQavELJBCrQfOWJVYqI71fI27kbb/Im CZH5mIc1AC8TcMQWHGYaDu189W+buQF5HSDGpTkHzAptRWI5OwFJJVYTGV0EdYQyBXjW MtQQ== X-Received: by 10.170.144.132 with SMTP id l126mr12629336ykc.129.1440173829579; Fri, 21 Aug 2015 09:17:09 -0700 (PDT) Received: from localhost.localdomain ([187.64.230.54]) by smtp.gmail.com with ESMTPSA id i201sm7811466ywc.43.2015.08.21.09.17.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 21 Aug 2015 09:17:09 -0700 (PDT) From: Fabio Estevam To: herbert@gondor.apana.org.au Cc: vicki.milhoan@freescale.com, horia.geanta@freescale.com, linux-crypto@vger.kernel.org, Fabio Estevam Subject: [PATCH v2 2/3] crypto: caam: ctrl: Propagate the real error code Date: Fri, 21 Aug 2015 13:16:43 -0300 Message-Id: <1440173804-26780-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1440173804-26780-1-git-send-email-festevam@gmail.com> References: <1440173804-26780-1-git-send-email-festevam@gmail.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam Instead of propagating a 'fake' error code, just propagate the real one in the case of caam_drv_identify_clk() failure. Signed-off-by: Fabio Estevam --- Changes since v1: - None drivers/crypto/caam/ctrl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index 9c5ca46..1153417 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c @@ -440,7 +440,7 @@ static int caam_probe(struct platform_device *pdev) ret = PTR_ERR(clk); dev_err(&pdev->dev, "can't identify CAAM ipg clk: %d\n", ret); - return -ENODEV; + return ret; } ctrlpriv->caam_ipg = clk; @@ -449,7 +449,7 @@ static int caam_probe(struct platform_device *pdev) ret = PTR_ERR(clk); dev_err(&pdev->dev, "can't identify CAAM mem clk: %d\n", ret); - return -ENODEV; + return ret; } ctrlpriv->caam_mem = clk; @@ -458,7 +458,7 @@ static int caam_probe(struct platform_device *pdev) ret = PTR_ERR(clk); dev_err(&pdev->dev, "can't identify CAAM aclk clk: %d\n", ret); - return -ENODEV; + return ret; } ctrlpriv->caam_aclk = clk; @@ -467,7 +467,7 @@ static int caam_probe(struct platform_device *pdev) ret = PTR_ERR(clk); dev_err(&pdev->dev, "can't identify CAAM emi_slow clk: %d\n", ret); - return -ENODEV; + return ret; } ctrlpriv->caam_emi_slow = clk;