kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] mtd: nand: Fix a couple error codes
@ 2017-04-04  8:15 Dan Carpenter
  2017-04-04  9:27 ` Marek Vasut
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Dan Carpenter @ 2017-04-04  8:15 UTC (permalink / raw)
  To: Wenyou Yang, Boris Brezillon
  Cc: Josh Wu, Richard Weinberger, David Woodhouse, Brian Norris,
	Marek Vasut, Cyrille Pitchen, linux-mtd, kernel-janitors

We accidentally return 1 on error instead of proper error codes.

Fixes: 07b23e3db9ed ("mtd: nand: Cleanup/rework the atmel_nand driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/mtd/nand/atmel/nand-controller.c b/drivers/mtd/nand/atmel/nand-controller.c
index 27301603f394..b8d17a024dbd 100644
--- a/drivers/mtd/nand/atmel/nand-controller.c
+++ b/drivers/mtd/nand/atmel/nand-controller.c
@@ -1686,7 +1686,7 @@ static int atmel_nand_controller_init(struct atmel_nand_controller *nc,
 	nc->smc = syscon_node_to_regmap(np);
 	of_node_put(np);
 	if (IS_ERR(nc->smc)) {
-		ret = IS_ERR(nc->smc);
+		ret = PTR_ERR(nc->smc);
 		dev_err(dev, "Could not get SMC regmap (err = %d)\n", ret);
 		return ret;
 	}
@@ -1719,7 +1719,7 @@ atmel_smc_nand_controller_init(struct atmel_smc_nand_controller *nc)
 	nc->matrix = syscon_node_to_regmap(np);
 	of_node_put(np);
 	if (IS_ERR(nc->matrix)) {
-		ret = IS_ERR(nc->matrix);
+		ret = PTR_ERR(nc->matrix);
 		dev_err(dev, "Could not get Matrix regmap (err = %d)\n", ret);
 		return ret;
 	}

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [patch] mtd: nand: Fix a couple error codes
  2017-04-04  8:15 [patch] mtd: nand: Fix a couple error codes Dan Carpenter
@ 2017-04-04  9:27 ` Marek Vasut
  2017-04-09 14:33 ` Boris Brezillon
  2017-04-11 11:37 ` Boris Brezillon
  2 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2017-04-04  9:27 UTC (permalink / raw)
  To: Dan Carpenter, Wenyou Yang, Boris Brezillon
  Cc: Josh Wu, Richard Weinberger, David Woodhouse, Brian Norris,
	Cyrille Pitchen, linux-mtd, kernel-janitors

On 04/04/2017 10:15 AM, Dan Carpenter wrote:
> We accidentally return 1 on error instead of proper error codes.
> 
> Fixes: 07b23e3db9ed ("mtd: nand: Cleanup/rework the atmel_nand driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Nice, thanks!

Acked-by: Marek Vasut <marek.vasut@gmail.com>

> 
> diff --git a/drivers/mtd/nand/atmel/nand-controller.c b/drivers/mtd/nand/atmel/nand-controller.c
> index 27301603f394..b8d17a024dbd 100644
> --- a/drivers/mtd/nand/atmel/nand-controller.c
> +++ b/drivers/mtd/nand/atmel/nand-controller.c
> @@ -1686,7 +1686,7 @@ static int atmel_nand_controller_init(struct atmel_nand_controller *nc,
>  	nc->smc = syscon_node_to_regmap(np);
>  	of_node_put(np);
>  	if (IS_ERR(nc->smc)) {
> -		ret = IS_ERR(nc->smc);
> +		ret = PTR_ERR(nc->smc);
>  		dev_err(dev, "Could not get SMC regmap (err = %d)\n", ret);
>  		return ret;
>  	}
> @@ -1719,7 +1719,7 @@ atmel_smc_nand_controller_init(struct atmel_smc_nand_controller *nc)
>  	nc->matrix = syscon_node_to_regmap(np);
>  	of_node_put(np);
>  	if (IS_ERR(nc->matrix)) {
> -		ret = IS_ERR(nc->matrix);
> +		ret = PTR_ERR(nc->matrix);
>  		dev_err(dev, "Could not get Matrix regmap (err = %d)\n", ret);
>  		return ret;
>  	}
> 


-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch] mtd: nand: Fix a couple error codes
  2017-04-04  8:15 [patch] mtd: nand: Fix a couple error codes Dan Carpenter
  2017-04-04  9:27 ` Marek Vasut
@ 2017-04-09 14:33 ` Boris Brezillon
  2017-04-10  7:09   ` Dan Carpenter
  2017-04-11 11:37 ` Boris Brezillon
  2 siblings, 1 reply; 6+ messages in thread
From: Boris Brezillon @ 2017-04-09 14:33 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Wenyou Yang, Josh Wu, Richard Weinberger, David Woodhouse,
	Brian Norris, Marek Vasut, Cyrille Pitchen, linux-mtd,
	kernel-janitors

Hi Dan,

On Tue, 4 Apr 2017 11:15:46 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> We accidentally return 1 on error instead of proper error codes.

These bugs have not reached Linus' tree yet and I'll have to force push
my nand/next branch because of regressions introduced by other patches
(not related to the Atmel NAND driver rework). Do you mind if I squash
the changes in the original commit?

Thanks,

Boris

> 
> Fixes: 07b23e3db9ed ("mtd: nand: Cleanup/rework the atmel_nand driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/mtd/nand/atmel/nand-controller.c b/drivers/mtd/nand/atmel/nand-controller.c
> index 27301603f394..b8d17a024dbd 100644
> --- a/drivers/mtd/nand/atmel/nand-controller.c
> +++ b/drivers/mtd/nand/atmel/nand-controller.c
> @@ -1686,7 +1686,7 @@ static int atmel_nand_controller_init(struct atmel_nand_controller *nc,
>  	nc->smc = syscon_node_to_regmap(np);
>  	of_node_put(np);
>  	if (IS_ERR(nc->smc)) {
> -		ret = IS_ERR(nc->smc);
> +		ret = PTR_ERR(nc->smc);
>  		dev_err(dev, "Could not get SMC regmap (err = %d)\n", ret);
>  		return ret;
>  	}
> @@ -1719,7 +1719,7 @@ atmel_smc_nand_controller_init(struct atmel_smc_nand_controller *nc)
>  	nc->matrix = syscon_node_to_regmap(np);
>  	of_node_put(np);
>  	if (IS_ERR(nc->matrix)) {
> -		ret = IS_ERR(nc->matrix);
> +		ret = PTR_ERR(nc->matrix);
>  		dev_err(dev, "Could not get Matrix regmap (err = %d)\n", ret);
>  		return ret;
>  	}


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch] mtd: nand: Fix a couple error codes
  2017-04-09 14:33 ` Boris Brezillon
@ 2017-04-10  7:09   ` Dan Carpenter
  2017-04-11  8:09     ` Boris Brezillon
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2017-04-10  7:09 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Wenyou Yang, Josh Wu, Richard Weinberger, David Woodhouse,
	Brian Norris, Marek Vasut, Cyrille Pitchen, linux-mtd,
	kernel-janitors

On Sun, Apr 09, 2017 at 04:33:22PM +0200, Boris Brezillon wrote:
> Hi Dan,
> 
> On Tue, 4 Apr 2017 11:15:46 +0300
> Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 
> > We accidentally return 1 on error instead of proper error codes.
> 
> These bugs have not reached Linus' tree yet and I'll have to force push
> my nand/next branch because of regressions introduced by other patches
> (not related to the Atmel NAND driver rework). Do you mind if I squash
> the changes in the original commit?
> 

No problem.  I'm lobying for a Fixes-from: tag for this, (which would
not cover style issues), but it's not an official tag yet.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch] mtd: nand: Fix a couple error codes
  2017-04-10  7:09   ` Dan Carpenter
@ 2017-04-11  8:09     ` Boris Brezillon
  0 siblings, 0 replies; 6+ messages in thread
From: Boris Brezillon @ 2017-04-11  8:09 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Wenyou Yang, Josh Wu, Richard Weinberger, David Woodhouse,
	Brian Norris, Marek Vasut, Cyrille Pitchen, linux-mtd,
	kernel-janitors

On Mon, 10 Apr 2017 10:09:43 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> On Sun, Apr 09, 2017 at 04:33:22PM +0200, Boris Brezillon wrote:
> > Hi Dan,
> > 
> > On Tue, 4 Apr 2017 11:15:46 +0300
> > Dan Carpenter <dan.carpenter@oracle.com> wrote:
> >   
> > > We accidentally return 1 on error instead of proper error codes.  
> > 
> > These bugs have not reached Linus' tree yet and I'll have to force push
> > my nand/next branch because of regressions introduced by other patches
> > (not related to the Atmel NAND driver rework). Do you mind if I squash
> > the changes in the original commit?
> >   
> 
> No problem.  I'm lobying for a Fixes-from: tag for this, (which would
> not cover style issues), but it's not an official tag yet.

Never mind. Another bug as been reported/fixed in the same driver, so
I'll just pick your patch as is instead of merging the changes in the
initial commit.

Thanks,

Boris

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch] mtd: nand: Fix a couple error codes
  2017-04-04  8:15 [patch] mtd: nand: Fix a couple error codes Dan Carpenter
  2017-04-04  9:27 ` Marek Vasut
  2017-04-09 14:33 ` Boris Brezillon
@ 2017-04-11 11:37 ` Boris Brezillon
  2 siblings, 0 replies; 6+ messages in thread
From: Boris Brezillon @ 2017-04-11 11:37 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Wenyou Yang, Josh Wu, Richard Weinberger, David Woodhouse,
	Brian Norris, Marek Vasut, Cyrille Pitchen, linux-mtd,
	kernel-janitors

On Tue, 4 Apr 2017 11:15:46 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> We accidentally return 1 on error instead of proper error codes.
> 

Applied.

Thanks,

Boris

> Fixes: 07b23e3db9ed ("mtd: nand: Cleanup/rework the atmel_nand driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/mtd/nand/atmel/nand-controller.c b/drivers/mtd/nand/atmel/nand-controller.c
> index 27301603f394..b8d17a024dbd 100644
> --- a/drivers/mtd/nand/atmel/nand-controller.c
> +++ b/drivers/mtd/nand/atmel/nand-controller.c
> @@ -1686,7 +1686,7 @@ static int atmel_nand_controller_init(struct atmel_nand_controller *nc,
>  	nc->smc = syscon_node_to_regmap(np);
>  	of_node_put(np);
>  	if (IS_ERR(nc->smc)) {
> -		ret = IS_ERR(nc->smc);
> +		ret = PTR_ERR(nc->smc);
>  		dev_err(dev, "Could not get SMC regmap (err = %d)\n", ret);
>  		return ret;
>  	}
> @@ -1719,7 +1719,7 @@ atmel_smc_nand_controller_init(struct atmel_smc_nand_controller *nc)
>  	nc->matrix = syscon_node_to_regmap(np);
>  	of_node_put(np);
>  	if (IS_ERR(nc->matrix)) {
> -		ret = IS_ERR(nc->matrix);
> +		ret = PTR_ERR(nc->matrix);
>  		dev_err(dev, "Could not get Matrix regmap (err = %d)\n", ret);
>  		return ret;
>  	}


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-11 11:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-04  8:15 [patch] mtd: nand: Fix a couple error codes Dan Carpenter
2017-04-04  9:27 ` Marek Vasut
2017-04-09 14:33 ` Boris Brezillon
2017-04-10  7:09   ` Dan Carpenter
2017-04-11  8:09     ` Boris Brezillon
2017-04-11 11:37 ` Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).