From patchwork Sat Sep 24 07:02:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuan Can X-Patchwork-Id: 12987419 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 58BE1C32771 for ; Sat, 24 Sep 2022 07:05:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7E55gRu8RrcIFuWRmwoEmY1pVh3YtyRxWuZgI41+Mfg=; b=hl7dgjfHiN64fq YW3UYN0sqhy//Px1YaZEzP63OFUJR4ljhwaxAMNxCQnRlNuA+9fSLzKiT20/UGbvpyOvyvRja+6hU Tq8o+bA2lOA9s0WtglZ5s5fW21jn7ipBObeh9y6D7yHU2vPafbWni7+jZQhVAi0skRwGHfDz3Lf/3 AfNqJnhGmOh9h5uiEqtI0tDIjgMttdBNtQbIbZJVHZBDwS5GjkLfVL68c33ZoPQCQO6Walj7pZwtg RK8P29dhMsU5kKWnkIfmpDc96NiQrbmUW53Lp3fRJ1NIddtWcaUMEytNhZ/awjFp2zwN5nJFHRcB0 kad7Wotm1pv2mMaVx6fw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1obzEV-006XuD-Oy; Sat, 24 Sep 2022 07:05:51 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1obzEP-006Xre-PB for linux-phy@lists.infradead.org; Sat, 24 Sep 2022 07:05:48 +0000 Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MZKgc6WxWzWgnQ; Sat, 24 Sep 2022 15:01:32 +0800 (CST) Received: from huawei.com (10.175.112.208) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 24 Sep 2022 15:05:32 +0800 From: Yuan Can To: , , , , , , CC: Subject: [PATCH RESEND 1/4] phy: qcom-qmp-combo: Use dev_err_probe() to simplify code Date: Sat, 24 Sep 2022 07:02:57 +0000 Message-ID: <20220924070300.25080-2-yuancan@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220924070300.25080-1-yuancan@huawei.com> References: <20220924070300.25080-1-yuancan@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.208] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220924_000546_015246_3C8519C3 X-CRM114-Status: GOOD ( 10.27 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. It also sets the defer probe reason which can be checked later through debugfs. Signed-off-by: Yuan Can Reviewed-by: Dmitry Baryshkov Reviewed-by: Andrew Halaney --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index 41f938126ff1..da85fbf2cb0c 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -2755,14 +2755,10 @@ static int qmp_combo_create(struct device *dev, struct device_node *np, int id, */ qphy->pipe_clk = devm_get_clk_from_child(dev, np, NULL); if (IS_ERR(qphy->pipe_clk)) { - if (cfg->type == PHY_TYPE_USB3) { - ret = PTR_ERR(qphy->pipe_clk); - if (ret != -EPROBE_DEFER) - dev_err(dev, - "failed to get lane%d pipe_clk, %d\n", - id, ret); - return ret; - } + if (cfg->type == PHY_TYPE_USB3) + return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk), + "failed to get lane%d pipe_clk\n", + id); qphy->pipe_clk = NULL; } @@ -2879,12 +2875,9 @@ static int qmp_combo_probe(struct platform_device *pdev) return ret; ret = qmp_combo_vreg_init(dev, cfg); - if (ret) { - if (ret != -EPROBE_DEFER) - dev_err(dev, "failed to get regulator supplies: %d\n", - ret); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, + "failed to get regulator supplies\n"); num = of_get_available_child_count(dev->of_node); /* do we have a rogue child node ? */ From patchwork Sat Sep 24 07:02:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuan Can X-Patchwork-Id: 12987416 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 22149C07E9D for ; Sat, 24 Sep 2022 07:05:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ch5hN8YHTTLdoa/pMU69TAUEIewTmjdhLXFwhdXuiSo=; b=h4CqcGnBh6MrrA LGrpRLX/Gv8ZO5t56OAzdnbhXgpgp20cyU6zfUTL7ftOWFwcFAFJfTsu+15q8EaZea1YBZm4EDGsd MlYd44Wn+0S1GJRwS2qPacgBhRydfo68Wx+/cnMdbynTcF7lXrumPxu/a80Qxj5hW8zL1oHYcSDXL 7ADytanc3qwxKjObQVQRw1Q9KAtWrQwWNzTQBwZ6lFtzU7NWT5zxoHx3ksIgGO5Vy2gG+CAD67qWH Uki0UU18M+xTm1jYEq9/CQNSDAugi2TXPS8tSmLT+lNspP8+4W9mDyAJasqK456w5f/FrbNhLCWXG 1ujTVdG01GPfFge05RsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1obzET-006Xtb-JJ; Sat, 24 Sep 2022 07:05:49 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1obzEP-006Xrf-PE for linux-phy@lists.infradead.org; Sat, 24 Sep 2022 07:05:47 +0000 Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MZKgd2rQTzWgxf; Sat, 24 Sep 2022 15:01:33 +0800 (CST) Received: from huawei.com (10.175.112.208) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 24 Sep 2022 15:05:32 +0800 From: Yuan Can To: , , , , , , CC: Subject: [PATCH RESEND 2/4] phy: qcom-qmp-pcie-msm8996: Use dev_err_probe() to simplify code Date: Sat, 24 Sep 2022 07:02:58 +0000 Message-ID: <20220924070300.25080-3-yuancan@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220924070300.25080-1-yuancan@huawei.com> References: <20220924070300.25080-1-yuancan@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.208] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220924_000546_026642_550EC5D5 X-CRM114-Status: UNSURE ( 9.89 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. It also sets the defer probe reason which can be checked later through debugfs. Signed-off-by: Yuan Can Reviewed-by: Dmitry Baryshkov Reviewed-by: Andrew Halaney --- drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c index 245f6dc1710e..690e0825e3b1 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c @@ -880,12 +880,9 @@ static int qmp_pcie_msm8996_probe(struct platform_device *pdev) return ret; ret = qmp_pcie_msm8996_vreg_init(dev, cfg); - if (ret) { - if (ret != -EPROBE_DEFER) - dev_err(dev, "failed to get regulator supplies: %d\n", - ret); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, + "failed to get regulator supplies\n"); num = of_get_available_child_count(dev->of_node); /* do we have a rogue child node ? */ From patchwork Sat Sep 24 07:02:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuan Can X-Patchwork-Id: 12987417 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 55522C6FA83 for ; Sat, 24 Sep 2022 07:05:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t1Q9VifcULBqNyCvev78SnCENbvbi/QtIarCkw3mW6E=; b=wYgj1d9j9aavTk L0jmvTxpryszsr5O0vy83rB+zgXGKGfTL2OvW4qi9e5oqIAsXnPDHtdU/KUzuRK/h+422sc5F4ogs 9DpAPJ1IOpyiXKmYKYBWF9YP2IeGkMuEwBDNi9Qt0AFm3wNdItYFCRvJHQVYSUUs66fibdPvqT735 0U0uFY9pc+iGlcE/UgmiUCPUOf/N45qtUP9oFbAsLtcQtB9MBxjgzSbQ9UKoJCBDUYalgtDOyYgSI j/9uLJVyRjzco2GnL/6AWmuHQNjgYz+WszT6pMtEWL65izjubAF/npvQYlyCTXm/mnowCH/EzPTW8 YFVGSL2kbVL1S+NaMohw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1obzET-006Xth-LB; Sat, 24 Sep 2022 07:05:49 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1obzEP-006Xrd-PC for linux-phy@lists.infradead.org; Sat, 24 Sep 2022 07:05:47 +0000 Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MZKgd6N8qzWh2K; Sat, 24 Sep 2022 15:01:33 +0800 (CST) Received: from huawei.com (10.175.112.208) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 24 Sep 2022 15:05:33 +0800 From: Yuan Can To: , , , , , , CC: Subject: [PATCH RESEND 3/4] phy: qcom-qmp-ufs: Use dev_err_probe() to simplify code Date: Sat, 24 Sep 2022 07:02:59 +0000 Message-ID: <20220924070300.25080-4-yuancan@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220924070300.25080-1-yuancan@huawei.com> References: <20220924070300.25080-1-yuancan@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.208] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220924_000546_022058_80D39E3E X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. It also sets the defer probe reason which can be checked later through debugfs. Signed-off-by: Yuan Can Reviewed-by: Dmitry Baryshkov Reviewed-by: Andrew Halaney --- drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c index 7b335b50b4a1..672ef4bbada7 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c @@ -1239,12 +1239,9 @@ static int qmp_ufs_probe(struct platform_device *pdev) return ret; ret = qmp_ufs_vreg_init(dev, cfg); - if (ret) { - if (ret != -EPROBE_DEFER) - dev_err(dev, "failed to get regulator supplies: %d\n", - ret); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, + "failed to get regulator supplies\n"); num = of_get_available_child_count(dev->of_node); /* do we have a rogue child node ? */ From patchwork Sat Sep 24 07:03:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuan Can X-Patchwork-Id: 12987418 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3DFEDC6FA86 for ; Sat, 24 Sep 2022 07:05:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=07wxVpfPuOxRammD7Z76VFIvOnf+zcbfj+YDxweqeoo=; b=fs6OGKRxclij25 UwfCSFYI4mTZ/Occ2ndIWpjoUlNagYktkyS3RPDvy1RUxonq4t4PFUvWWFh3Culs8WRE/gk1PoUlA Unm1ftSc2VFIYQ2c9x5bpylm2NxGtmr8/W1E+gFEj4f0DWQYiH7hElVPd1bcrl02F5jjVzhOJr6BZ 4Y4pdYqcEXgf2QVuJZCwdFG8zGOUBi90/j5PBA9H1JhJcUED6NfSvf4KpHs+ty9kC+34l+lx00L7+ qytiXOkCP6ytY9t6EFPT9Rs068JeKKsebf0z4AZwWUjArNuG8aqvY9moX+gkj/MwVhmNFMGxhqGWb B3crtdaLDIECs0dFEalg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1obzEV-006Xu7-NG; Sat, 24 Sep 2022 07:05:51 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1obzEP-006Xrg-PC for linux-phy@lists.infradead.org; Sat, 24 Sep 2022 07:05:48 +0000 Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MZKfp0kVyzHtfr; Sat, 24 Sep 2022 15:00:50 +0800 (CST) Received: from huawei.com (10.175.112.208) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 24 Sep 2022 15:05:33 +0800 From: Yuan Can To: , , , , , , CC: Subject: [PATCH RESEND 4/4] phy: qcom-qmp-usb: Use dev_err_probe() to simplify code Date: Sat, 24 Sep 2022 07:03:00 +0000 Message-ID: <20220924070300.25080-5-yuancan@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220924070300.25080-1-yuancan@huawei.com> References: <20220924070300.25080-1-yuancan@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.208] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220924_000546_032765_1877907C X-CRM114-Status: UNSURE ( 9.89 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org In the probe path, dev_err() can be replaced with dev_err_probe() which will check if error code is -EPROBE_DEFER and prints the error name. It also sets the defer probe reason which can be checked later through debugfs. Signed-off-by: Yuan Can Reviewed-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Reviewed-by: Andrew Halaney --- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index 93994f1a46e2..2ff2e798d6e2 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -2817,12 +2817,9 @@ static int qmp_usb_probe(struct platform_device *pdev) return ret; ret = qmp_usb_vreg_init(dev, cfg); - if (ret) { - if (ret != -EPROBE_DEFER) - dev_err(dev, "failed to get regulator supplies: %d\n", - ret); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, + "failed to get regulator supplies\n"); num = of_get_available_child_count(dev->of_node); /* do we have a rogue child node ? */