[PATCH v3] param: add error check to __dev_add_param()

Sascha Hauer s.hauer at pengutronix.de
Thu Jan 29 23:42:21 PST 2015


On Thu, Jan 29, 2015 at 07:43:06PM +0900, Masahiro Yamada wrote:
> If strdup() fails with out-of-memory, __dev_add_param() should fail
> with -ENOMEM.
> 
> (Note strdup() is always given with a non-NULL pointer.  If the
> argument name is given with NULL, the system would already have
> crashed in the get_param_by_name() function.)
> 
> Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>

Applied, thanks

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