]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 7 Apr 2020 08:50:10 +0000 (10:50 +0200)
commitb52be79f3c6cc89bb3834c5174843e34f945f386
tree552c91d3c15c8c61f7ea3be75cd283747ad5c9d9
parent688a3ded0df1ecc40db414c541cc74bdb01892ab
driver core: Print device when resources present in really_probe()

BugLink: https://bugs.launchpad.net/bugs/1867837
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/base/dd.c