]> git.karo-electronics.de Git - karo-tx-linux.git/commit
greybus: connection: fix up error patch logic in gb_connection_create()
authorGreg Kroah-Hartman <greg@kroah.com>
Wed, 29 Oct 2014 01:57:08 +0000 (09:57 +0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 29 Oct 2014 01:57:08 +0000 (09:57 +0800)
commit4b640bb1357a3eed16a04b23167dc3de4294dcd9
treefd91570adcb1a2cf34288dd46e143c8ac8fc91c9
parent4ccb6b7abb8ee4ff6fc28468ffe893caa730ea13
greybus: connection: fix up error patch logic in gb_connection_create()

Once you have called device_initialize() you have to call put_device()
on the structure to clean it up on an error path, otherwise you will
leak memory.

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/connection.c