aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2019-06-04 21:01:55 +0200
committerMarek Vasut <marex@denx.de>2019-06-14 12:39:50 +0200
commit25ee924649f94b42fba8ef615b5eb39db19044cd (patch)
treed2834e951d31eaaf25f3fcbd2673b46409e4b7cf /common
parent634931fea542fc59cf7537b6c2c163942a6ccd15 (diff)
downloadu-boot-25ee924649f94b42fba8ef615b5eb39db19044cd.zip
u-boot-25ee924649f94b42fba8ef615b5eb39db19044cd.tar.gz
u-boot-25ee924649f94b42fba8ef615b5eb39db19044cd.tar.bz2
usb: gadget: error out if g_dnl registration fails
If g_dnl_register fails return an error rather then stubornly continuing onwards. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl_sdp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c
index 807256e..7fc4404 100644
--- a/common/spl/spl_sdp.c
+++ b/common/spl/spl_sdp.c
@@ -17,7 +17,11 @@ static int spl_sdp_load_image(struct spl_image_info *spl_image,
const int controller_index = 0;
g_dnl_clear_detach();
- g_dnl_register("usb_dnl_sdp");
+ ret = g_dnl_register("usb_dnl_sdp");
+ if (ret) {
+ pr_err("SDP dnl register failed: %d\n", ret);
+ return ret;
+ }
ret = sdp_init(controller_index);
if (ret) {