[PATCH 3/6] ARM: mx23-evk: Fix result checking of devfs_add_partition

Sascha Hauer s.hauer at pengutronix.de
Wed Oct 2 04:29:25 EDT 2013


On Tue, Oct 01, 2013 at 09:49:47AM +0200, Uwe Kleine-König wrote:
> Hello Sascha,
> 
> On Tue, Oct 01, 2013 at 08:22:05AM +0200, Sascha Hauer wrote:
> > +	if (IS_ERR(cdev))
> > +		return PTR_ERR(cdev);
> > +	return 0;
> In Linux you can use
> 
> 	return PTR_ERR_OR_ZERO(cdev)
> 
> instead. Didn't check if barebox already has that.

I wasn't aware this exists. barebox currently doesn't have this, but it
would be nice to introduce it.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list