Skip to content
Commit 9ad30721 authored by Rob Herring's avatar Rob Herring Committed by Greg Kroah-Hartman
Browse files

driver core: Refactor multiple copies of device cleanup



There are 3 copies of the same device cleanup code used for probe failure,
testing re-probing, and device unbinding. Changes to this code often miss
at least one of the copies of the code. See commits d0243bbd ("drivers
core: Free dma_range_map when driver probe failed") and d8f7a548
("driver core: Free DMA range map when device is released") for example.

Let's refactor the code to its own function.

Signed-off-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220223225257.1681968-2-robh@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5bff9632
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment