From patchwork Fri Mar 28 09:05:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shao.mingyin@zte.com.cn X-Patchwork-Id: 14031775 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B56817BA3; Fri, 28 Mar 2025 09:05:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=63.216.63.35 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743152721; cv=none; b=WTVDD8qa40ExbihziNd9cVd/7Q5iOxGbCzYCZN2uVFINtlhTHgoC99V2sDh5vy32NUCQZGx1dyHcpy+Cu+MYoa1KpIUhWMeXxEpZkVyOmk6KZShsIBu7mSDsKUUxTeiwEhBDcCqW41nSo4umazOthYZHJM+/swK4/CZs+DEi1MQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743152721; c=relaxed/simple; bh=Z0NePWjC0usRfphBp4RYVUXKLMLWOyek6WqP11WZt3M=; h=Date:Message-ID:Mime-Version:From:To:Cc:Subject:Content-Type; b=oSZCJhXhqJiGT7okEfeW5MEDKHmNJY8OGneHqT9rf7Ox9pnNtkKGiqJFxz1CTY8Nu6YEcE6+RucbuPJiJsdU3cfDr7X2HL1dTCLAM6NrAAimSPo7vIJYI6rwzSyHJd873nxWG1dwBY6mcK0sAadEl7hb2n7j10kFA8xQuCucaGc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn; spf=pass smtp.mailfrom=zte.com.cn; arc=none smtp.client-ip=63.216.63.35 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zte.com.cn Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4ZPF3f34lyz5B1Jd; Fri, 28 Mar 2025 17:05:18 +0800 (CST) Received: from xaxapp05.zte.com.cn ([10.99.98.109]) by mse-fl2.zte.com.cn with SMTP id 52S958Sd007615; Fri, 28 Mar 2025 17:05:08 +0800 (+08) (envelope-from shao.mingyin@zte.com.cn) Received: from mapi (xaxapp05[null]) by mapi (Zmail) with MAPI id mid32; Fri, 28 Mar 2025 17:05:10 +0800 (CST) Date: Fri, 28 Mar 2025 17:05:10 +0800 (CST) X-Zmail-TransId: 2afc67e66646ffffffffca3-c3901 X-Mailer: Zmail v1.0 Message-ID: <20250328170510996P1Sd9KSFJn1p08vc0LXHX@zte.com.cn> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 From: To: Cc: , , , , , , , , Subject: =?utf-8?q?=5BPATCH=5D_phy/qualcomm=3A_phy-qcom-ipq4019-usb=3A_Use_d?= =?utf-8?q?ev=5Ferr=5Fprobe=28=29?= X-MAIL: mse-fl2.zte.com.cn 52S958Sd007615 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 67E6664E.001/4ZPF3f34lyz5B1Jd From: Zhang Enpei Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Zhang Enpei Signed-off-by: Shao Mingyin --- drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c b/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c index da6f290af722..738b3015747f 100644 --- a/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c @@ -109,11 +109,9 @@ static int ipq4019_usb_phy_probe(struct platform_device *pdev) } phy->por_rst = devm_reset_control_get(phy->dev, "por_rst"); - if (IS_ERR(phy->por_rst)) { - if (PTR_ERR(phy->por_rst) != -EPROBE_DEFER) - dev_err(dev, "POR reset is missing\n"); - return PTR_ERR(phy->por_rst); - } + if (IS_ERR(phy->por_rst)) + return dev_err_probe(dev, PTR_ERR(phy->por_rst), + "POR reset is missing\n"); phy->srif_rst = devm_reset_control_get_optional(phy->dev, "srif_rst"); if (IS_ERR(phy->srif_rst))