Skip to contentSkip to conversation

spl: dfu: Fix printed variable name

PATCH New Marek Vasut 1 participant 1 message May 25, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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().

---
 common/spl/spl_dfu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/spl/spl_dfu.c +1 -1
index 01178f611f..c0225dc4e1 100644
@@ -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;
 	}
 
Signature · 1 line
2.20.1