niu: Fix error handling
authorDan Carpenter <error27@gmail.com>
Wed, 8 Apr 2009 22:44:04 +0000 (15:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Apr 2009 22:44:04 +0000 (15:44 -0700)
commit58f3e0a864c46dadbeadf682e6bbdcab14ba19d3
tree7630276b8177b034e1cb79f58be73dbb3199527e
parentb5e86db4c7f6397ef86ab5e4a3fbece966935577
niu: Fix 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.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/niu.c