diff mbox

clk: davinci: cfgchip: testing the wrong variable

Message ID 20180602075256.hrvidsfsmr33mv2f@kili.mountain (mailing list archive)
State Awaiting Upstream, archived
Headers show

Commit Message

Dan Carpenter June 2, 2018, 7:52 a.m. UTC
There is a copy and paste bug here.  We should be testing "usb1" instead
of "usb0".

Fixes: 58e1e2d2cd89 ("clk: davinci: cfgchip: Add TI DA8XX USB PHY clocks")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Lechner June 2, 2018, 2:33 p.m. UTC | #1
On 06/02/2018 02:52 AM, Dan Carpenter wrote:
> There is a copy and paste bug here.  We should be testing "usb1" instead
> of "usb0".
> 
> Fixes: 58e1e2d2cd89 ("clk: davinci: cfgchip: Add TI DA8XX USB PHY clocks")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/clk/davinci/da8xx-cfgchip.c b/drivers/clk/davinci/da8xx-cfgchip.c
> index c971111d2601..20a120aa147e 100644
> --- a/drivers/clk/davinci/da8xx-cfgchip.c
> +++ b/drivers/clk/davinci/da8xx-cfgchip.c
> @@ -672,7 +672,7 @@ static int of_da8xx_usb_phy_clk_init(struct device *dev, struct regmap *regmap)
>   
>   	usb1 = da8xx_cfgchip_register_usb1_clk48(dev, regmap);
>   	if (IS_ERR(usb1)) {
> -		if (PTR_ERR(usb0) == -EPROBE_DEFER)
> +		if (PTR_ERR(usb1) == -EPROBE_DEFER)
>   			return -EPROBE_DEFER;
>   
>   		dev_warn(dev, "Failed to register usb1_clk48 (%ld)\n",
> 

Reviewed-by: David Lechner <david@lechnology.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Lechner June 25, 2018, 11:17 p.m. UTC | #2
On 06/02/2018 02:52 AM, Dan Carpenter wrote:
> There is a copy and paste bug here.  We should be testing "usb1" instead
> of "usb0".
> 
> Fixes: 58e1e2d2cd89 ("clk: davinci: cfgchip: Add TI DA8XX USB PHY clocks")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/clk/davinci/da8xx-cfgchip.c b/drivers/clk/davinci/da8xx-cfgchip.c
> index c971111d2601..20a120aa147e 100644
> --- a/drivers/clk/davinci/da8xx-cfgchip.c
> +++ b/drivers/clk/davinci/da8xx-cfgchip.c
> @@ -672,7 +672,7 @@ static int of_da8xx_usb_phy_clk_init(struct device *dev, struct regmap *regmap)
>   
>   	usb1 = da8xx_cfgchip_register_usb1_clk48(dev, regmap);
>   	if (IS_ERR(usb1)) {
> -		if (PTR_ERR(usb0) == -EPROBE_DEFER)
> +		if (PTR_ERR(usb1) == -EPROBE_DEFER)
>   			return -EPROBE_DEFER;
>   
>   		dev_warn(dev, "Failed to register usb1_clk48 (%ld)\n",
> 

Applied to https://github.com/dlech/linux/tree/clk-davinci-fixes

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stephen Boyd June 25, 2018, 11:33 p.m. UTC | #3
Quoting David Lechner (2018-06-25 16:17:55)
> On 06/02/2018 02:52 AM, Dan Carpenter wrote:
> > There is a copy and paste bug here.  We should be testing "usb1" instead
> > of "usb0".
> > 
> > Fixes: 58e1e2d2cd89 ("clk: davinci: cfgchip: Add TI DA8XX USB PHY clocks")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > 
> > diff --git a/drivers/clk/davinci/da8xx-cfgchip.c b/drivers/clk/davinci/da8xx-cfgchip.c
> > index c971111d2601..20a120aa147e 100644
> > --- a/drivers/clk/davinci/da8xx-cfgchip.c
> > +++ b/drivers/clk/davinci/da8xx-cfgchip.c
> > @@ -672,7 +672,7 @@ static int of_da8xx_usb_phy_clk_init(struct device *dev, struct regmap *regmap)
> >   
> >       usb1 = da8xx_cfgchip_register_usb1_clk48(dev, regmap);
> >       if (IS_ERR(usb1)) {
> > -             if (PTR_ERR(usb0) == -EPROBE_DEFER)
> > +             if (PTR_ERR(usb1) == -EPROBE_DEFER)
> >                       return -EPROBE_DEFER;
> >   
> >               dev_warn(dev, "Failed to register usb1_clk48 (%ld)\n",
> > 
> 
> Applied to https://github.com/dlech/linux/tree/clk-davinci-fixes
> 

Ok. I expect this will be coming in a PR soon? Usually I can pick up
fixes just fine from the list and merge them on up to Linus, unless you
feel the need to pick it into your development tree to base future
development on.

--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Lechner June 25, 2018, 11:57 p.m. UTC | #4
On 06/25/2018 06:33 PM, Stephen Boyd wrote:
> Quoting David Lechner (2018-06-25 16:17:55)
>> On 06/02/2018 02:52 AM, Dan Carpenter wrote:
>>> There is a copy and paste bug here.  We should be testing "usb1" instead
>>> of "usb0".
>>>
>>> Fixes: 58e1e2d2cd89 ("clk: davinci: cfgchip: Add TI DA8XX USB PHY clocks")
>>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>>>
>>> diff --git a/drivers/clk/davinci/da8xx-cfgchip.c b/drivers/clk/davinci/da8xx-cfgchip.c
>>> index c971111d2601..20a120aa147e 100644
>>> --- a/drivers/clk/davinci/da8xx-cfgchip.c
>>> +++ b/drivers/clk/davinci/da8xx-cfgchip.c
>>> @@ -672,7 +672,7 @@ static int of_da8xx_usb_phy_clk_init(struct device *dev, struct regmap *regmap)
>>>    
>>>        usb1 = da8xx_cfgchip_register_usb1_clk48(dev, regmap);
>>>        if (IS_ERR(usb1)) {
>>> -             if (PTR_ERR(usb0) == -EPROBE_DEFER)
>>> +             if (PTR_ERR(usb1) == -EPROBE_DEFER)
>>>                        return -EPROBE_DEFER;
>>>    
>>>                dev_warn(dev, "Failed to register usb1_clk48 (%ld)\n",
>>>
>>
>> Applied to https://github.com/dlech/linux/tree/clk-davinci-fixes
>>
> 
> Ok. I expect this will be coming in a PR soon? Usually I can pick up
> fixes just fine from the list and merge them on up to Linus, unless you
> feel the need to pick it into your development tree to base future
> development on.
> 

Yes, in a few minutes actually. I have never done a PR via email before,
so I figured this would be a good way to learn with a few small patches.

I know everyone is always busy, so of course, if I'm making more work for
you, I'll be glad to do it differently.

And I'll keep this in mind for future fixes.
--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/clk/davinci/da8xx-cfgchip.c b/drivers/clk/davinci/da8xx-cfgchip.c
index c971111d2601..20a120aa147e 100644
--- a/drivers/clk/davinci/da8xx-cfgchip.c
+++ b/drivers/clk/davinci/da8xx-cfgchip.c
@@ -672,7 +672,7 @@  static int of_da8xx_usb_phy_clk_init(struct device *dev, struct regmap *regmap)
 
 	usb1 = da8xx_cfgchip_register_usb1_clk48(dev, regmap);
 	if (IS_ERR(usb1)) {
-		if (PTR_ERR(usb0) == -EPROBE_DEFER)
+		if (PTR_ERR(usb1) == -EPROBE_DEFER)
 			return -EPROBE_DEFER;
 
 		dev_warn(dev, "Failed to register usb1_clk48 (%ld)\n",