All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ionut Nicu <ionut.nicu@gmail.com>
To: Greg Kroah-Hartman <greg@kroah.com>,
	Omar Ramirez Luna <omar.ramirez@ti.com>
Cc: Fernando Guzman Lugo <x0095840@ti.com>,
	Felipe Contreras <felipe.contreras@gmail.com>,
	linux-omap <linux-omap@vger.kernel.org>,
	Ionut Nicu <ionut.nicu@mindbit.ro>
Subject: [PATCH v2 1/3] staging: tidspbridge: fix mgr_enum_node_info
Date: Fri,  5 Nov 2010 17:15:46 +0200	[thread overview]
Message-ID: <1288970148-22191-2-git-send-email-ionut.nicu@mindbit.ro> (raw)
In-Reply-To: <1288970148-22191-1-git-send-email-ionut.nicu@mindbit.ro>

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: Ionut Nicu <ionut.nicu@mindbit.ro>
---
 drivers/staging/tidspbridge/rmgr/mgr.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/tidspbridge/rmgr/mgr.c b/drivers/staging/tidspbridge/rmgr/mgr.c
index 0ea89a1..2eab6a5 100644
--- a/drivers/staging/tidspbridge/rmgr/mgr.c
+++ b/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 (node_id > (node_index - 1)) {
 			status = -EINVAL;
-- 
1.7.2.3


  reply	other threads:[~2010-11-05 15:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-05 15:15 [PATCH v2 0/3] staging: tidspbridge: bugfixes Ionut Nicu
2010-11-05 15:15 ` Ionut Nicu [this message]
2010-11-05 16:01   ` [PATCH v2 1/3] staging: tidspbridge: fix mgr_enum_node_info Felipe Contreras
2010-11-05 16:09     ` Greg KH
2010-11-05 16:17       ` Ionut Nicu
2010-11-05 16:24         ` Greg KH
2010-11-05 15:15 ` [PATCH v2 2/3] staging: tidspbridge: mgr_enum_node_info cleanup Ionut Nicu
2010-11-05 15:15 ` [PATCH v2 3/3] staging: tidspbridge: fix kernel oops in bridge_io_get_proc_load Ionut Nicu
2010-11-05 15:43 ` [PATCH v2 0/3] staging: tidspbridge: bugfixes Greg KH
2010-11-05 16:00   ` Ionut Nicu
2010-11-05 17:54     ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1288970148-22191-2-git-send-email-ionut.nicu@mindbit.ro \
    --to=ionut.nicu@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=greg@kroah.com \
    --cc=ionut.nicu@mindbit.ro \
    --cc=linux-omap@vger.kernel.org \
    --cc=omar.ramirez@ti.com \
    --cc=x0095840@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.