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 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox