driver core: Fix error return code in really_probe()
authorZhen Lei <thunder.leizhen@huawei.com>
Wed, 7 Jul 2021 07:43:01 +0000 (15:43 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 07:50:33 +0000 (09:50 +0200)
commit203537ff35eac98544fb35751826e66ea6cb7da6
tree6e715b46c2a6fa7194d2e6af2adaa4f2930bce0b
parent4225d357bc759c4694db01af06e0f85ed374594b
driver core: Fix error return code in really_probe()

[ Upstream commit f04948dea236b000da09c466a7ec931ecd8d7867 ]

In the case of error handling, the error code returned by the subfunction
should be propagated instead of 0.

Fixes: 1901fb2604fb ("Driver core: fix "driver" symlink timing")
Fixes: 23b6904442d0 ("driver core: add dev_groups to all drivers")
Fixes: 8fd456ec0cf0 ("driver core: Add state_synced sysfs file for devices that support it")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20210707074301.2722-1-thunder.leizhen@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/base/dd.c