Skip to content
Commit ff5a938d authored by Linyu Yuan's avatar Linyu Yuan Committed by Greg Kroah-Hartman
Browse files

usb: gadget: configfs: remove os_desc_attr_release()



it is not allow to create sub group under os_desc,

/sys/kernel/config/usb_gadget/dummy/os_desc # mkdir dummy
mkdir: can't create directory 'dummy': Operation not permitted

no one will kmalloc() os_desc entry and kfree(os_desc) will never be called.
static void os_desc_attr_release(struct config_item *item)
{
       struct os_desc *os_desc = to_os_desc(item);
       kfree(os_desc);
}

remove struct os_desc definition, to_os_desc() and os_desc_attr_release().

Reviewed-by: default avatarJack Pham <quic_jackp@quicinc.com>
Signed-off-by: default avatarLinyu Yuan <quic_linyyuan@quicinc.com>
Link: https://lore.kernel.org/r/1637211213-16400-3-git-send-email-quic_linyyuan@quicinc.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 167a799c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment