]> git.baikalelectronics.ru Git - 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jan 2020 15:14:48 +0000 (16:14 +0100)
commit42b0c55e9c9213f86c1565722e5b4c7126d06e77
treea9d7226a602093ce036a5ea795c59c2cdd870057
parent54422c0348305b3025ed0465f6500b3b23c1059e
driver core: Print device when resources present in really_probe()

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>
drivers/base/dd.c