diff mbox series

phy: phy-mtk-dp: Fix an error code in probe()

Message ID 3c699e00-2883-40d9-92c3-0da1dc38fdd4@moroto.mountain
State Accepted
Commit 03966c3950d36d6b671158be3794eb7211434faa
Headers show
Series phy: phy-mtk-dp: Fix an error code in probe() | expand

Commit Message

Dan Carpenter July 11, 2023, 6:13 a.m. UTC
Negative -EINVAL was intended instead of positive EINVAL.

Fixes: 6a23afad443a ("phy: phy-mtk-dp: Add driver for DP phy")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/phy/mediatek/phy-mtk-dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chen-Yu Tsai July 11, 2023, 6:26 a.m. UTC | #1
On Tue, Jul 11, 2023 at 2:13 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> Negative -EINVAL was intended instead of positive EINVAL.
>
> Fixes: 6a23afad443a ("phy: phy-mtk-dp: Add driver for DP phy")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Vinod Koul July 11, 2023, 7:36 a.m. UTC | #2
On Tue, 11 Jul 2023 09:13:25 +0300, Dan Carpenter wrote:
> Negative -EINVAL was intended instead of positive EINVAL.
> 
> 

Applied, thanks!

[1/1] phy: phy-mtk-dp: Fix an error code in probe()
      commit: 03966c3950d36d6b671158be3794eb7211434faa

Best regards,
AngeloGioacchino Del Regno July 11, 2023, 9:22 a.m. UTC | #3
Il 11/07/23 08:13, Dan Carpenter ha scritto:
> Negative -EINVAL was intended instead of positive EINVAL.
> 
> Fixes: 6a23afad443a ("phy: phy-mtk-dp: Add driver for DP phy")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
diff mbox series

Patch

diff --git a/drivers/phy/mediatek/phy-mtk-dp.c b/drivers/phy/mediatek/phy-mtk-dp.c
index 232fd3f1ff1b..d7024a144335 100644
--- a/drivers/phy/mediatek/phy-mtk-dp.c
+++ b/drivers/phy/mediatek/phy-mtk-dp.c
@@ -169,7 +169,7 @@  static int mtk_dp_phy_probe(struct platform_device *pdev)
 
 	regs = *(struct regmap **)dev->platform_data;
 	if (!regs)
-		return dev_err_probe(dev, EINVAL,
+		return dev_err_probe(dev, -EINVAL,
 				     "No data passed, requires struct regmap**\n");
 
 	dp_phy = devm_kzalloc(dev, sizeof(*dp_phy), GFP_KERNEL);