Skip to content
Commit befa45fb authored by Fuqian Huang's avatar Fuqian Huang Committed by Bjorn Helgaas
Browse files

PCI: Use devm_add_action_or_reset()



devm_add_action_or_reset() is a helper function which internally calls
devm_add_action().  If the devm_add_action() fails, it will execute the
action mentioned and return the error code.

Use devm_add_action_or_reset() to reduce source code size (avoid writing
the action twice) and reduce the likelihood of bugs.

Link: https://lore.kernel.org/r/20190708123354.12127-1-huangfq.daxian@gmail.com
Signed-off-by: default avatarFuqian Huang <huangfq.daxian@gmail.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 5f9e832c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment