aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2019-10-02 14:29:21 +0200
committerMarek Vasut <marek.vasut+renesas@gmail.com>2019-10-31 12:12:31 +0100
commit0896d2caf7dc3babf9d518c6faabacb114bad6f2 (patch)
treeb3c9134bb007e5364b2241b2ecd3885a32dd1917 /cmd
parentfd15b58c1a9a61edcdeef8ce1eb4df2442295f58 (diff)
downloadu-boot-0896d2caf7dc3babf9d518c6faabacb114bad6f2.zip
u-boot-0896d2caf7dc3babf9d518c6faabacb114bad6f2.tar.gz
u-boot-0896d2caf7dc3babf9d518c6faabacb114bad6f2.tar.bz2
thor: fix error path after g_dnl_register() failure
Set command return value and perform needed cleanup when g_dnl_register() function fails. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/thordown.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/thordown.c b/cmd/thordown.c
index dd0544d..8dae024 100644
--- a/cmd/thordown.c
+++ b/cmd/thordown.c
@@ -40,7 +40,8 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
ret = g_dnl_register("usb_dnl_thor");
if (ret) {
pr_err("g_dnl_register failed %d\n", ret);
- return ret;
+ ret = CMD_RET_FAILURE;
+ goto exit;
}
ret = thor_init();