Skip to content

Commit

Permalink
staging: tidspbridge: fix mgr_enum_node_info
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Contreras authored and Omar Ramirez Luna committed Feb 5, 2011
1 parent 81ea18e commit d723818
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/staging/tidspbridge/rmgr/mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 (node_id > (node_index - 1)) {
status = -EINVAL;
Expand Down

0 comments on commit d723818

Please sign in to comment.