driver core: Better distinguish probe errors in really_probe
authorChristoph Hellwig <hch@lst.de>
Thu, 17 Jun 2021 14:22:10 +0000 (16:22 +0200)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 21 Jun 2021 21:29:24 +0000 (15:29 -0600)
commite1499647c69c72c4583273e773d8c2786cb4bee9
tree3a9e2d5c2087114c77ab4d30c840211f46423296
parent204db60c83574559a8e08ce4bbd0029d56b8ab2e
driver core: Better distinguish probe errors in really_probe

really_probe tries to special case errors from ->probe, but due to all
other initialization added to the function over time now a lot of
internal errors hit that code path as well.  Untangle that by adding
a new probe_err local variable and apply the special casing only to
that.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com>
Link: https://lore.kernel.org/r/20210617142218.1877096-3-hch@lst.de
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/base/dd.c