Commit 5b84bd95 authored by Junjie Mao's avatar Junjie Mao Committed by popcornmix
Browse files

driver core: bus: Goto appropriate labels on failure in bus_add_device



[ Upstream commit 1c34203a ]

It is not necessary to call device_remove_groups() when device_add_groups()
fails.

The group added by device_add_groups() should be removed if sysfs_create_link()
fails.

Fixes: fa6fdb33 ("driver core: bus_type: add dev_groups")
Signed-off-by: default avatarJunjie Mao <junjie_mao@yeah.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 0af513da
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment