From: Haggai Eran Date: Sun, 18 May 2014 08:12:26 +0000 (+0300) Subject: IB/core: Fix kobject leak on device register error flow X-Git-Tag: omap-for-v3.16/fixes-against-rc1~68^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=584482ac80e13250061fcc85ea8a68c6a31d5033;p=pandora-kernel.git IB/core: Fix kobject leak on device register error flow The ports kobject isn't being released during error flow in device registration. This patch refactors the ports kobject cleanup into a single function called from both the error flow in device registration and from the unregistration function. A couple of attributes aren't being deleted (iw_stats_group, and ib_class_attributes). While this may be handled implicitly by the destruction of their kobjects, it seems better to handle all the attributes the same way. Signed-off-by: Haggai Eran [ Make free_port_list_attributes() static. - Roland ] Signed-off-by: Roland Dreier --- Reading git-diff-tree failed