From e2b9b8fbf8ee1f8e9775b473de7ee464f32aed50 Mon Sep 17 00:00:00 2001
From: Wenkai Lin <linwenkai6@hisilicon.com>
Date: Tue, 4 Jan 2022 12:20:27 +0800
Subject: [PATCH 34/53] uadk: fix check_after_sink

No need to check last ret, it cause check_after_sink.

Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com>
---
 wd.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/wd.c b/wd.c
index 25386d7..238ce8a 100644
--- a/wd.c
+++ b/wd.c
@@ -171,11 +171,7 @@ static int get_dev_info(struct uacce_dev *dev)
 	if (ret < 0)
 		return ret;
 
-	ret = get_str_attr(dev, "algorithms", dev->algs, MAX_ATTR_STR_SIZE);
-	if (ret < 0)
-		return ret;
-
-	return 0;
+	return get_str_attr(dev, "algorithms", dev->algs, MAX_ATTR_STR_SIZE);
 }
 
 static struct uacce_dev *read_uacce_sysfs(const char *dev_name)
@@ -215,7 +211,7 @@ static struct uacce_dev *read_uacce_sysfs(const char *dev_name)
 			goto out_dir;
 
 		ret = get_dev_info(dev);
-		if (ret) {
+		if (ret < 0) {
 			WD_ERR("failed to get dev info: ret = %d!\n", ret);
 			goto out_dir;
 		}
-- 
2.25.1

