linux/drivers/base/firmware_loader
Luis R. Rodriguez d15d731155 firmware: fix checking for return values for fw_add_devm_name()
Currently fw_add_devm_name() returns 1 if the firmware cache
was already set. This makes it complicated for us to check for
correctness. It is actually non-fatal if the firmware cache
is already setup, so just return 0, and simplify the checkers.

fw_add_devm_name() adds device's name onto the devres for the
device so that prior to suspend we cache the firmware onto memory,
so that on resume the firmware is reliably available. We never
were checking for success for this call though, meaning in some
really rare cases we my have never setup the firmware cache for
a device, which could in turn make resume fail.

This is all theoretical, no known issues have been reported.
This small issue has been present way since the addition of the
devres firmware cache names on v3.7.

Fixes: f531f05ae9 ("firmware loader: store firmware name into devres list")
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-20 09:28:47 +01:00
..
fallback_table.c firmware: enable to force disable the fallback mechanism at run time 2018-03-20 09:28:47 +01:00
fallback.c rename: _request_firmware_load() fw_load_sysfs_fallback() 2018-03-20 09:28:47 +01:00
fallback.h firmware: enable to force disable the fallback mechanism at run time 2018-03-20 09:28:47 +01:00
firmware.h firmware: move firmware loader into its own directory 2018-03-20 09:28:46 +01:00
main.c firmware: fix checking for return values for fw_add_devm_name() 2018-03-20 09:28:47 +01:00
Makefile firmware: move firmware loader into its own directory 2018-03-20 09:28:46 +01:00