浏览代码

staging: tidspbridge: fix mgr_enum_node_info

The current code was always returning a non-zero status value
to userspace applications when this ioctl was called.

The error code was ENODATA, which isn't actually an error,
it's always returned by dcd_enumerate_object() when it hits the
end of list.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Felipe Contreras 14 年之前
父节点
当前提交
d723818e7c
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      drivers/staging/tidspbridge/rmgr/mgr.c

+ 5 - 0
drivers/staging/tidspbridge/rmgr/mgr.c

@@ -169,6 +169,11 @@ int mgr_enum_node_info(u32 node_id, struct dsp_ndbprops *pndb_props,
 
 
 		}
 		}
 	}
 	}
+
+	/* the last status is not 0, but neither an error */
+	if (status > 0)
+		status = 0;
+
 	if (!status) {
 	if (!status) {
 		if (node_id > (node_index - 1)) {
 		if (node_id > (node_index - 1)) {
 			status = -EINVAL;
 			status = -EINVAL;