Staging: ipack: returning a freed pointer
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 10 May 2012 15:18:36 +0000 (18:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 May 2012 16:50:11 +0000 (09:50 -0700)
If ipack_device_register() returns an error, then we returned a freed
pointer.  The caller doesn't use it, but it means we return success to
the user instead of returning an error code.

I kind of rewrote the error handling in this function as a cleanup.

Cc: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

No differences found