Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1663308 > unrolled thread

[PATCH] phy: cpcap-usb: Fix missing return statement

Started byTony Lindgren <tony@atomide.com>
First post2017-06-12 10:20 +0200
Last post2017-06-16 08:00 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] phy: cpcap-usb: Fix missing return statement Tony Lindgren <tony@atomide.com> - 2017-06-12 10:20 +0200
    Re: [PATCH] phy: cpcap-usb: Fix missing return statement Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-06-12 11:50 +0200
    Re: [PATCH] phy: cpcap-usb: Fix missing return statement Kishon Vijay Abraham I <kishon@ti.com> - 2017-06-16 08:00 +0200

#1663308 — [PATCH] phy: cpcap-usb: Fix missing return statement

FromTony Lindgren <tony@atomide.com>
Date2017-06-12 10:20 +0200
Subject[PATCH] phy: cpcap-usb: Fix missing return statement
Message-ID<tRsJQ-86G-13@gated-at.bofh.it>
Commit 8ae904e3c236 ("phy: cpcap-usb: Add CPCAP PMIC USB support")
is missing return statement as noted by Colin Ian King
<colin.king@canonical.com>. If the optional pins are not configured,
we just want to return early and not attempt to configure the pins.

Fixes: 8ae904e3c236 ("phy: cpcap-usb: Add CPCAP PMIC USB support")
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/phy/motorola/phy-cpcap-usb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/phy/motorola/phy-cpcap-usb.c b/drivers/phy/motorola/phy-cpcap-usb.c
--- a/drivers/phy/motorola/phy-cpcap-usb.c
+++ b/drivers/phy/motorola/phy-cpcap-usb.c
@@ -468,6 +468,8 @@ static int cpcap_usb_init_optional_pins(struct cpcap_phy_ddata *ddata)
 		dev_info(ddata->dev, "default pins not configured: %ld\n",
 			 PTR_ERR(ddata->pins));
 		ddata->pins = NULL;
+
+		return 0;
 	}
 
 	ddata->pins_ulpi = pinctrl_lookup_state(ddata->pins, "ulpi");
-- 
2.13.0

[toc] | [next] | [standalone]


#1663383

FromSebastian Reichel <sebastian.reichel@collabora.co.uk>
Date2017-06-12 11:50 +0200
Message-ID<tRu8W-p0-25@gated-at.bofh.it>
In reply to#1663308

[Multipart message — attachments visible in raw view] — view raw

Hi,

On Mon, Jun 12, 2017 at 01:12:23AM -0700, Tony Lindgren wrote:
> Commit 8ae904e3c236 ("phy: cpcap-usb: Add CPCAP PMIC USB support")
> is missing return statement as noted by Colin Ian King
> <colin.king@canonical.com>. If the optional pins are not configured,
> we just want to return early and not attempt to configure the pins.
> 
> Fixes: 8ae904e3c236 ("phy: cpcap-usb: Add CPCAP PMIC USB support")
> Reported-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

> ---
>  drivers/phy/motorola/phy-cpcap-usb.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/phy/motorola/phy-cpcap-usb.c b/drivers/phy/motorola/phy-cpcap-usb.c
> --- a/drivers/phy/motorola/phy-cpcap-usb.c
> +++ b/drivers/phy/motorola/phy-cpcap-usb.c
> @@ -468,6 +468,8 @@ static int cpcap_usb_init_optional_pins(struct cpcap_phy_ddata *ddata)
>  		dev_info(ddata->dev, "default pins not configured: %ld\n",
>  			 PTR_ERR(ddata->pins));
>  		ddata->pins = NULL;
> +
> +		return 0;
>  	}
>  
>  	ddata->pins_ulpi = pinctrl_lookup_state(ddata->pins, "ulpi");
> -- 
> 2.13.0
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [next] | [standalone]


#1667432

FromKishon Vijay Abraham I <kishon@ti.com>
Date2017-06-16 08:00 +0200
Message-ID<tSSsx-4nm-1@gated-at.bofh.it>
In reply to#1663308

On Monday 12 June 2017 01:42 PM, Tony Lindgren wrote:
> Commit 8ae904e3c236 ("phy: cpcap-usb: Add CPCAP PMIC USB support")
> is missing return statement as noted by Colin Ian King
> <colin.king@canonical.com>. If the optional pins are not configured,
> we just want to return early and not attempt to configure the pins.
> 
> Fixes: 8ae904e3c236 ("phy: cpcap-usb: Add CPCAP PMIC USB support")
> Reported-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>

merged, thanks!

-Kishon
> ---
>  drivers/phy/motorola/phy-cpcap-usb.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/phy/motorola/phy-cpcap-usb.c b/drivers/phy/motorola/phy-cpcap-usb.c
> --- a/drivers/phy/motorola/phy-cpcap-usb.c
> +++ b/drivers/phy/motorola/phy-cpcap-usb.c
> @@ -468,6 +468,8 @@ static int cpcap_usb_init_optional_pins(struct cpcap_phy_ddata *ddata)
>  		dev_info(ddata->dev, "default pins not configured: %ld\n",
>  			 PTR_ERR(ddata->pins));
>  		ddata->pins = NULL;
> +
> +		return 0;
>  	}
>  
>  	ddata->pins_ulpi = pinctrl_lookup_state(ddata->pins, "ulpi");
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web