From patchwork Tue Dec 3 12:13:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Draszik?= X-Patchwork-Id: 13892289 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 95843E64A83 for ; Tue, 3 Dec 2024 12:17:58 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aA/MWKcMHvlEvSF2mytGD25q2yXqc/rACkiW3VE4c8U=; b=KC21sw9w21DDiX GucU/HXHWHh5A5/fooJ2O7nkoWCZsc2XLv/aGfYqWnevvGyRAggShDMwy047UFS7mS7Rpxf+t/YzR c8W6Np7XXvnkYoM0blAjpuxPf1WHsy5mQGrcet7370tn4x9hP9Vk7IomMUjVJimPiDNjzftu9DirC wH0GGIWSisClgpInC7VUWY39e/jexo9u4m1+ta00a2BZ6rhJO9NnLFSHvO7KLpPLDCRUQcbpTXhzn xU4wEqfNngXjZ2qq50xai13oLeWExUXjmRqzAcV2udOVpMgJ8mDmpZKQgiZCU+Hhd7QRfWoWMXyTH 8Z4uwLX7ZRyifds/8cKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tIRqo-00000009Ofp-0nLQ; Tue, 03 Dec 2024 12:17:58 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tIRms-00000009NeQ-2RZp for linux-phy@lists.infradead.org; Tue, 03 Dec 2024 12:13:56 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-53df67d6659so8480417e87.3 for ; Tue, 03 Dec 2024 04:13:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733228032; x=1733832832; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=H11rnIjZ/6A+y0BhElAhFFU5gZO2NZydl8Xc9FZjLpY=; b=O8MCqRie4YO2ExDgGGkkbLImDvgUSK2lY9sY8WZLRPEm0OEzeEDAHBJNMJlUD9fGr8 S+dkDy4WMkaF0HkoRy69BMBWKFwIWGycpLzVNU+LIS6yRvx6TBwKaCR4CqQT7t4Uis0i aO4Hg2CASszi34y/fuWQ0Lvx0Y1B9nWiXZEeCBBzG7+ia/GQbxaP5ePD+8QkGEbNHh0W AkcoK2JCMSA2NgfOtThmSnVRsMhWCrdJrkksoCVPHE6nLQcpl7qn2imakbCvOpB5JJGv /P7UaDaMu9ivb7WgOgdz97PtB7YWGqpvgQx5Ng+BwZtAjOp7qDBPHmaImCuciszWYq9G Hpjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733228032; x=1733832832; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H11rnIjZ/6A+y0BhElAhFFU5gZO2NZydl8Xc9FZjLpY=; b=aiAObjZiS53+6J/KA8/reGmz7rZb+dI0edWDJRq7uf03EqOL3dmAHXfZhMM39+d1P/ ++XeeIaMicGrbbzCr0cILugSo9GFXQlUyVY5RM5ftGSOsx3KhYIznROyCTevzWWzk5Kb HZQ2yDMtKIx5rUc3Z8Jbz4c+52d0kc+7TgXPSB49+oaUiv4U6/47jmudOU0EW+hSlwIr tAC6OquhRGhM7IIzzfKtJCRONZfmBPcCkowY6lnUudzGUEIipV+vGjHtrN70UmOPKOaT FgrZj6Zh6SVboXWqE/TEur1mLbtX7svx2CJZSh8TrBE3nhYTzRRa1zRsgjmovatN5XkS W0ZQ== X-Forwarded-Encrypted: i=1; AJvYcCUZddAx9YSbuGx3W6W4k/IQCwJ1n6QQhLeBpJPBdfFoopeeeZc3JLAYbyyghjfPTO1wDTaes4g79K4=@lists.infradead.org X-Gm-Message-State: AOJu0YyRvYm5m4rs0GavDNsXa4utFHNpDJ70/SQBeW7NHGhXEO/ndWT5 4yGfFpEJmXQ+6NlmLso/BL7J8QpxnDsavNuPdPx4g6iKgaHyw5NgbPETVouUGo0= X-Gm-Gg: ASbGncseN8OnIUyHqRsgw0F35WfCZaDQNRezf2fyqJqkAMiXVlqSQKntupw1+jGuAV7 ZSkPz6IXU3jGy19E71+tmmcHTd9fAP5VXXtvhkPszcXff6boJlJvLKPh04CyAR6M5jsx4JWFrva UPdogX0Sk1JrccgQbFcd0IrStUui5fms6a7ArukrOYL7SPdfTtPRH+hvKZgZXEDjJw9wsNYFC9B 0W/ULZYCcj8LFCDerAwnYGjBk7jm+pz+On+bryny2RfGf016beaeSsCeuTlS5fzH4TuZvNaPP9c rfGtj7vZRIpWQKGoCrwU+zGFpuhiIQniLQ== X-Google-Smtp-Source: AGHT+IHQdMSg8Woe8SDIrFAGgEbEvNlb4MTQhoB4mrSWw8iZG9ODfRvK6W0FE8ok+EwQTy/draIGwg== X-Received: by 2002:a05:6512:32c9:b0:53d:e592:5415 with SMTP id 2adb3069b0e04-53e12a07a6amr2081271e87.34.1733228032380; Tue, 03 Dec 2024 04:13:52 -0800 (PST) Received: from puffmais.c.googlers.com (64.227.90.34.bc.googleusercontent.com. [34.90.227.64]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa5996c245bsm607603766b.8.2024.12.03.04.13.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Dec 2024 04:13:52 -0800 (PST) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Tue, 03 Dec 2024 12:13:51 +0000 Subject: [PATCH v2 3/8] phy: exynos5-usbdrd: convert to dev_err_probe MIME-Version: 1.0 Message-Id: <20241203-gs101-phy-lanes-orientation-phy-v2-3-40dcf1b7670d@linaro.org> References: <20241203-gs101-phy-lanes-orientation-phy-v2-0-40dcf1b7670d@linaro.org> In-Reply-To: <20241203-gs101-phy-lanes-orientation-phy-v2-0-40dcf1b7670d@linaro.org> To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Marek Szyprowski , Sylwester Nawrocki , Alim Akhtar Cc: Peter Griffin , Tudor Ambarus , Sam Protsenko , Will McVicker , Roy Luo , kernel-team@android.com, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Draszik?= , Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241203_041354_624541_2F1425AC X-CRM114-Status: GOOD ( 10.73 ) 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 dev_err_probe() exists to simplify code. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Peter Griffin Signed-off-by: André Draszik --- v2: * collect tags --- drivers/phy/samsung/phy-exynos5-usbdrd.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c index c421b495eb0f..ceae4b47cece 100644 --- a/drivers/phy/samsung/phy-exynos5-usbdrd.c +++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c @@ -1725,10 +1725,9 @@ static int exynos5_usbdrd_phy_probe(struct platform_device *pdev) reg_pmu = syscon_regmap_lookup_by_phandle(dev->of_node, "samsung,pmu-syscon"); - if (IS_ERR(reg_pmu)) { - dev_err(dev, "Failed to lookup PMU regmap\n"); - return PTR_ERR(reg_pmu); - } + if (IS_ERR(reg_pmu)) + return dev_err_probe(dev, PTR_ERR(reg_pmu), + "Failed to lookup PMU regmap\n"); /* * Exynos5420 SoC has multiple channels for USB 3.0 PHY, with @@ -1759,10 +1758,9 @@ static int exynos5_usbdrd_phy_probe(struct platform_device *pdev) for (i = 0; i < EXYNOS5_DRDPHYS_NUM; i++) { struct phy *phy = devm_phy_create(dev, NULL, drv_data->phy_ops); - if (IS_ERR(phy)) { - dev_err(dev, "Failed to create usbdrd_phy phy\n"); - return PTR_ERR(phy); - } + if (IS_ERR(phy)) + return dev_err_probe(dev, PTR_ERR(phy), + "Failed to create usbdrd_phy phy\n"); phy_drd->phys[i].phy = phy; phy_drd->phys[i].index = i; @@ -1786,10 +1784,9 @@ static int exynos5_usbdrd_phy_probe(struct platform_device *pdev) phy_provider = devm_of_phy_provider_register(dev, exynos5_usbdrd_phy_xlate); - if (IS_ERR(phy_provider)) { - dev_err(phy_drd->dev, "Failed to register phy provider\n"); - return PTR_ERR(phy_provider); - } + if (IS_ERR(phy_provider)) + return dev_err_probe(phy_drd->dev, PTR_ERR(phy_provider), + "Failed to register phy provider\n"); return 0; }