nui.c error handling
Subsystems (2)
PATCH 1/1 nui.c error handling
platform_device_register_simple() returns ERR_PTR(), not NULL, if an error occurs.
Found by smatch (http://repo.or.cz/w/smatch.git). Compile tested.
regards,
dan carpenter
Signed-off-by Dan Carpenter <[email protected]>
drivers/net/niu.c +1 -1
@@ -8757,7 +8757,7 @@ plat_dev =platform_device_register_simple ("niu" , niu_parent_index,NULL ,0 ); -if (!plat_dev) +if (IS_ERR (plat_dev))return NULL ;for (i =0 ;attr_name (niu_parent_attributes[i]); i++) {
From: Dan Carpenter <[email protected]>
Date: Wed, 8 Apr 2009 14:39:28 +0300 (EAT)
Quoted 6 lines
platform_device_register_simple()returnsERR_PTR(), not NULL, if an error occurs.Found by smatch (http://repo.or.cz/w/smatch.git). Compile tested.
Signed-off-by Dan Carpenter <[email protected]>
Applied, thanks.