]> git.karo-electronics.de Git - karo-tx-linux.git/commit
greybus: connection: remove extra kfree() call
authorAlex Elder <elder@linaro.org>
Fri, 12 Jun 2015 15:21:06 +0000 (10:21 -0500)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 12 Jun 2015 19:13:01 +0000 (12:13 -0700)
commit856618f3fb6506f277adf060717590d03d3fb559
tree3636c4c308bb93b1dfc8eedc5402cab1c9b1e21f
parent55a8e3550364a35bc5d40fa0e445049a5df62627
greybus: connection: remove extra kfree() call

When an error occurs in the device_add() call for a connection, the
device reference is dropped as required.  Because that's the device's
only reference, that will also lead to gb_connection_release() being
called, which frees the connection structure.

Right now we're then making an extra request to free the connection,
which is wrong.  Fix that.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/connection.c