OSDN Git Service

driver core: Print device when resources present in really_probe()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 6 Dec 2019 13:22:19 +0000 (14:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:34:47 +0000 (08:34 +0100)
commit73504f095df344ad50be94c760d7c6188ad68c15
tree26cb7ee5c0502a8e04db1c7c0a2aedc0bebbe6ef
parentdc2edd3023eb4036998a89e02ae2ce039b3dd439
driver core: Print device when resources present in really_probe()

[ Upstream commit 7c35e699c88bd60734277b26962783c60e04b494 ]

If a device already has devres items attached before probing, a warning
backtrace is printed.  However, this backtrace does not reveal the
offending device, leaving the user uninformed.  Furthermore, using
WARN_ON() causes systems with panic-on-warn to reboot.

Fix this by replacing the WARN_ON() by a dev_crit() message.
Abort probing the device, to prevent doing more damage to the device's
resources.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20191206132219.28908-1-geert+renesas@glider.be
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/base/dd.c