2016-11-15 09:54:55

by Dan Carpenter

[permalink] [raw]
Subject: [patch] ARM: socfpga: checking the wrong variable

This is a cut and paste bug. We had intended to check "sysmgr".

Fixes: e5f8efa5c8bf ("ARM: socfpga: fpga bridge driver support")
Signed-off-by: Dan Carpenter <[email protected]>

diff --git a/drivers/fpga/altera-fpga2sdram.c b/drivers/fpga/altera-fpga2sdram.c
index 7ab358e..d4eeb74 100644
--- a/drivers/fpga/altera-fpga2sdram.c
+++ b/drivers/fpga/altera-fpga2sdram.c
@@ -123,7 +123,7 @@ static int alt_fpga_bridge_probe(struct platform_device *pdev)
}

sysmgr = syscon_regmap_lookup_by_compatible("altr,sys-mgr");
- if (IS_ERR(priv->sdrctl)) {
+ if (IS_ERR(sysmgr)) {
dev_err(dev, "regmap for altr,sys-mgr lookup failed.\n");
return PTR_ERR(sysmgr);
}


2016-11-15 15:37:17

by Moritz Fischer

[permalink] [raw]
Subject: Re: [patch] ARM: socfpga: checking the wrong variable

Hi Dan,
On Tue, Nov 15, 2016 at 1:54 AM, Dan Carpenter <[email protected]> wrote:
> This is a cut and paste bug. We had intended to check "sysmgr".
>
> Fixes: e5f8efa5c8bf ("ARM: socfpga: fpga bridge driver support")
> Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Moritz Fischer <[email protected]>

>
> diff --git a/drivers/fpga/altera-fpga2sdram.c b/drivers/fpga/altera-fpga2sdram.c
> index 7ab358e..d4eeb74 100644
> --- a/drivers/fpga/altera-fpga2sdram.c
> +++ b/drivers/fpga/altera-fpga2sdram.c
> @@ -123,7 +123,7 @@ static int alt_fpga_bridge_probe(struct platform_device *pdev)
> }
>
> sysmgr = syscon_regmap_lookup_by_compatible("altr,sys-mgr");
> - if (IS_ERR(priv->sdrctl)) {
> + if (IS_ERR(sysmgr)) {
> dev_err(dev, "regmap for altr,sys-mgr lookup failed.\n");
> return PTR_ERR(sysmgr);
> }

Thanks,

Moritz

2016-11-15 16:02:07

by atull

[permalink] [raw]
Subject: Re: [patch] ARM: socfpga: checking the wrong variable



On Tue, 15 Nov 2016, Moritz Fischer wrote:

> Hi Dan,
> On Tue, Nov 15, 2016 at 1:54 AM, Dan Carpenter <[email protected]> wrote:
> > This is a cut and paste bug. We had intended to check "sysmgr".
> >
> > Fixes: e5f8efa5c8bf ("ARM: socfpga: fpga bridge driver support")
> > Signed-off-by: Dan Carpenter <[email protected]>
> Acked-by: Moritz Fischer <[email protected]>

Hi Dan,

Acked-by: Alan Tull <[email protected]>

Thanks for catching this!

Alan

>
> >
> > diff --git a/drivers/fpga/altera-fpga2sdram.c b/drivers/fpga/altera-fpga2sdram.c
> > index 7ab358e..d4eeb74 100644
> > --- a/drivers/fpga/altera-fpga2sdram.c
> > +++ b/drivers/fpga/altera-fpga2sdram.c
> > @@ -123,7 +123,7 @@ static int alt_fpga_bridge_probe(struct platform_device *pdev)
> > }
> >
> > sysmgr = syscon_regmap_lookup_by_compatible("altr,sys-mgr");
> > - if (IS_ERR(priv->sdrctl)) {
> > + if (IS_ERR(sysmgr)) {
> > dev_err(dev, "regmap for altr,sys-mgr lookup failed.\n");
> > return PTR_ERR(sysmgr);
> > }
>
> Thanks,
>
> Moritz
>