diff mbox series

phy: exynos5-usbdrd: fix error code in probe()

Message ID a956a3e2-c6ce-4f07-ad80-ec8a96e00d16@stanley.mountain (mailing list archive)
State Accepted
Commit 3a07703a523045cbdb0a5fa5e0902a9145ee43e9
Headers show
Series phy: exynos5-usbdrd: fix error code in probe() | expand

Commit Message

Dan Carpenter July 8, 2024, 5:04 p.m. UTC
Return negative -ENOMEM instead of positive ENOMEM.

Fixes: 497ddafe915e ("phy: exynos5-usbdrd: convert Vbus supplies to regulator_bulk")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/phy/samsung/phy-exynos5-usbdrd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

André Draszik July 8, 2024, 5:33 p.m. UTC | #1
On Mon, 2024-07-08 at 12:04 -0500, Dan Carpenter wrote:
> Return negative -ENOMEM instead of positive ENOMEM.
> 
> Fixes: 497ddafe915e ("phy: exynos5-usbdrd: convert Vbus supplies to regulator_bulk")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Reviewed-by: André Draszik <andre.draszik@linaro.org>
Markus Elfring July 8, 2024, 6:26 p.m. UTC | #2
> Return negative -ENOMEM instead of positive ENOMEM.

Would you like to refer to the function name “exynos5_usbdrd_phy_probe”
in the summary phrase?

Regards,
Markus
Sam Protsenko July 8, 2024, 8:26 p.m. UTC | #3
On Mon, Jul 8, 2024 at 12:04 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> Return negative -ENOMEM instead of positive ENOMEM.
>
> Fixes: 497ddafe915e ("phy: exynos5-usbdrd: convert Vbus supplies to regulator_bulk")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---

Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>

>  drivers/phy/samsung/phy-exynos5-usbdrd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c
> index df52b78a120b..9cbf90142950 100644
> --- a/drivers/phy/samsung/phy-exynos5-usbdrd.c
> +++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c
> @@ -1745,7 +1745,7 @@ static int exynos5_usbdrd_phy_probe(struct platform_device *pdev)
>                                            sizeof(*phy_drd->regulators),
>                                            GFP_KERNEL);
>         if (!phy_drd->regulators)
> -               return ENOMEM;
> +               return -ENOMEM;
>         regulator_bulk_set_supply_names(phy_drd->regulators,
>                                         drv_data->regulator_names,
>                                         drv_data->n_regulators);
> --
> 2.43.0
>
Peter Griffin July 9, 2024, 10:51 a.m. UTC | #4
On Mon, 8 Jul 2024 at 18:04, Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> Return negative -ENOMEM instead of positive ENOMEM.
>
> Fixes: 497ddafe915e ("phy: exynos5-usbdrd: convert Vbus supplies to regulator_bulk")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---

Reviewed-by:  Peter Griffin <peter.griffin@linaro.org>
Vinod Koul Aug. 4, 2024, 5:52 p.m. UTC | #5
On Mon, 08 Jul 2024 12:04:33 -0500, Dan Carpenter wrote:
> Return negative -ENOMEM instead of positive ENOMEM.
> 
> 

Applied, thanks!

[1/1] phy: exynos5-usbdrd: fix error code in probe()
      commit: 3a07703a523045cbdb0a5fa5e0902a9145ee43e9

Best regards,
diff mbox series

Patch

diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c
index df52b78a120b..9cbf90142950 100644
--- a/drivers/phy/samsung/phy-exynos5-usbdrd.c
+++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c
@@ -1745,7 +1745,7 @@  static int exynos5_usbdrd_phy_probe(struct platform_device *pdev)
 					   sizeof(*phy_drd->regulators),
 					   GFP_KERNEL);
 	if (!phy_drd->regulators)
-		return ENOMEM;
+		return -ENOMEM;
 	regulator_bulk_set_supply_names(phy_drd->regulators,
 					drv_data->regulator_names,
 					drv_data->n_regulators);