• Haggai Eran's avatar
    IB/core: Fix kobject leak on device register error flow · 584482ac
    Haggai Eran authored
    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: default avatarHaggai Eran <haggaie@mellanox.com>
    
    [ Make free_port_list_attributes() static.  - Roland ]
    Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
    584482ac
sysfs.c 23.9 KB