mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
hw/nvram/fw_cfg: Simplify fw_cfg_add_from_generator() error propagation
Document FWCfgDataGeneratorClass::get_data() return NULL on error, and non-NULL on success. This allow us to simplify fw_cfg_add_from_generator(). Since we don't need a local variable to propagate the error, we can remove the ERRP_GUARD() macro. Suggested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200721131911.27380-2-philmd@redhat.com>
This commit is contained in:
parent
90218a9a39
commit
a3ad58342a
2 changed files with 4 additions and 3 deletions
|
@ -32,7 +32,9 @@ typedef struct FWCfgDataGeneratorClass {
|
|||
* @obj: the object implementing this interface
|
||||
* @errp: pointer to a NULL-initialized error object
|
||||
*
|
||||
* Returns: reference to a byte array containing the data.
|
||||
* Returns: reference to a byte array containing the data on success,
|
||||
* or NULL on error.
|
||||
*
|
||||
* The caller should release the reference when no longer
|
||||
* required.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue