From patchwork Tue Sep 1 15:27:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 293090 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 803D5C433E7 for ; Tue, 1 Sep 2020 16:40:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5634A2078B for ; Tue, 1 Sep 2020 16:40:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598978443; bh=sDJbBtyuXPf8AdJ2TLEs7TvBFyJ4HZya4/KdpqfIghc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=XptV13lpUxRdY9vB1v5yUsxgG6Nfk9dc0xv/QtEIQ4zTua4yJ5E3/u9r7scrUtp51 54zjIEctZ2kgFGsePxjyzXf7rTX2Q7Uk6BNQZDY1kTC+v10BcOqGkc3ZpLSwm4ukH/ 1Lml/4trqOx/vL4JawXMyEf6TFMDl147O/zxgefg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728077AbgIAQkh (ORCPT ); Tue, 1 Sep 2020 12:40:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:56410 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730305AbgIAP2O (ORCPT ); Tue, 1 Sep 2020 11:28:14 -0400 Received: from kozik-lap.mshome.net (unknown [194.230.155.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F05A82078B; Tue, 1 Sep 2020 15:28:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598974094; bh=sDJbBtyuXPf8AdJ2TLEs7TvBFyJ4HZya4/KdpqfIghc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fAHrqrmSB4+wTOyV0CJPyMHjbIK7a2KePXXbjKYHvv5XgBqg//ACEhBjJ0ylaK0Ec EeG4O3t/mJEqHW08oNKRn144pLZz9feRDorO86UEs6QnJLpiKzgmRuHvVeBjFlXpS2 hmvYeTll0PNzb0AVA0nqTfLeMEpOWb5YTF9WeGzQ= From: Krzysztof Kozlowski To: Tudor Ambarus , Mark Brown , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , Nicolas Saenz Julienne , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Andy Gross , Bjorn Andersson , Orson Zhai , Baolin Wang , Chunyan Zhang , Maxime Coquelin , Alexandre Torgue , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 07/11] spi: qcom-qspi: Simplify with dev_err_probe() Date: Tue, 1 Sep 2020 17:27:09 +0200 Message-Id: <20200901152713.18629-7-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200901152713.18629-1-krzk@kernel.org> References: <20200901152713.18629-1-krzk@kernel.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski --- drivers/spi/spi-qcom-qspi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-qcom-qspi.c b/drivers/spi/spi-qcom-qspi.c index b8857a97f40a..f83755e292bb 100644 --- a/drivers/spi/spi-qcom-qspi.c +++ b/drivers/spi/spi-qcom-qspi.c @@ -495,9 +495,8 @@ static int qcom_qspi_probe(struct platform_device *pdev) ctrl->icc_path_cpu_to_qspi = devm_of_icc_get(dev, "qspi-config"); if (IS_ERR(ctrl->icc_path_cpu_to_qspi)) { - ret = PTR_ERR(ctrl->icc_path_cpu_to_qspi); - if (ret != -EPROBE_DEFER) - dev_err(dev, "Failed to get cpu path: %d\n", ret); + ret = dev_err_probe(dev, PTR_ERR(ctrl->icc_path_cpu_to_qspi), + "Failed to get cpu path\n"); goto exit_probe_master_put; } /* Set BW vote for register access */