]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - common/spl/spl_sdp.c
usb: gadget: error out if g_dnl registration fails
[thirdparty/u-boot.git] / common / spl / spl_sdp.c
index 69390edcbaebe3542e14542cbe90ba527649c11b..7fc440497186f0ba25ea6f37375296497d1a7d6a 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2016 Toradex
  * Author: Stefan Agner <stefan.agner@toradex.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -18,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) {