From 634931fea542fc59cf7537b6c2c163942a6ccd15 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 25 May 2019 22:50:35 +0200 Subject: spl: dfu: Fix printed variable name The SPL DFU uses dfu_alt_info_N variable name to determine the DFU configuration, where N is the name of the media (e.g. ram). It does not use the plain dfu_alt_info. Print the name of the missing env variable in case of a failure instead of printing dfu_alt_info, which is just the name of the parameter passed to spl_dfu_cmd(). Signed-off-by: Marek Vasut Cc: Tom Rini --- common/spl/spl_dfu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/spl') diff --git a/common/spl/spl_dfu.c b/common/spl/spl_dfu.c index 01178f611f..c0225dc4e1 100644 --- a/common/spl/spl_dfu.c +++ b/common/spl/spl_dfu.c @@ -41,7 +41,7 @@ int spl_dfu_cmd(int usbctrl, char *dfu_alt_info, char *interface, char *devstr) set_default_env(NULL, 0); str_env = env_get(dfu_alt_info); if (!str_env) { - pr_err("\"dfu_alt_info\" env variable not defined!\n"); + pr_err("\"%s\" env variable not defined!\n", dfu_alt_info); return -EINVAL; } -- cgit v1.2.3 From 25ee924649f94b42fba8ef615b5eb39db19044cd Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Tue, 4 Jun 2019 21:01:55 +0200 Subject: 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 --- common/spl/spl_sdp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'common/spl') diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c index 807256e908..7fc4404971 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) { -- cgit v1.2.3