param: add error check to __dev_add_param()
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@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 2f02530 commit 03dabc0fe4477954f4b37e3149e80ec643c0d03c
@Masahiro Yamada Masahiro Yamada authored on 29 Jan 2015
Sascha Hauer committed on 2 Feb 2015
Showing 1 changed file
View
lib/parameter.c