commit | af2334823189b2f6b91fe85f44ee6241d92d7667 | [log] [tgz] |
---|---|---|
author | Marek Szyprowski <m.szyprowski@samsung.com> | Wed Oct 02 14:29:21 2019 +0200 |
committer | Marek Vasut <marek.vasut+renesas@gmail.com> | Thu Oct 31 12:12:31 2019 +0100 |
tree | b3c9134bb007e5364b2241b2ecd3885a32dd1917 | |
parent | c6de6cf526a3aa10ff8aaf3454f8886b267bbea8 [diff] |
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>
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 @@ 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();