From 464f4d6ee240e5afd44317d9b7bc4a1228c04899 Mon Sep 17 00:00:00 2001 From: Jacob Garber Date: Wed, 5 Jun 2019 17:03:30 -0600 Subject: device: Tidy up add_more_links() - Add documentation comment - Use 'unsigned int' to make checkpatch happy - Return early if no more links need to be added - Add error handling if malloc fails - Clean up whitespace Change-Id: I70976ee2539b058721d0ae3c15edf279253cd9b7 Signed-off-by: Jacob Garber Found-by: Coverity CID 1229634 Reviewed-on: https://review.coreboot.org/c/coreboot/+/33238 Reviewed-by: Angel Pons Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) --- src/include/device/device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/include/device') diff --git a/src/include/device/device.h b/src/include/device/device.h index 52635e1bd2..8e9454c4e1 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -191,7 +191,7 @@ const char *bus_path(struct bus *bus); void dev_set_enabled(struct device *dev, int enable); void disable_children(struct bus *bus); bool dev_is_active_bridge(struct device *dev); -void add_more_links(struct device *dev, unsigned total_links); +void add_more_links(struct device *dev, unsigned int total_links); /* Option ROM helper functions */ void run_bios(struct device *dev, unsigned long addr); -- cgit v1.2.3