From d3d2043c45c50a162a657fac6b7b9f91b47d9309 Mon Sep 17 00:00:00 2001 From: Ernesto Ramos Date: Wed, 28 Jul 2010 11:50:36 -0500 Subject: [PATCH] --- yaml --- r: 206039 b: refs/heads/master c: 35f338e4f2fcd2614f6fdff33f38920cf9434f86 h: refs/heads/master i: 206037: 9be35b422a020f8e351ae7ac4c77c0c664207c5b 206035: a69bb30401bb496b609f73cdfb300eb6d994c934 206031: 1d646c983dd5af231a3c7e8da8c08354f33757d7 v: v3 --- [refs] | 2 +- trunk/drivers/staging/tidspbridge/pmgr/dspapi.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index cc229de67303..1f580ff83a3d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 019415ce5e00bcc0287f2ea88042b9fb685cdbcf +refs/heads/master: 35f338e4f2fcd2614f6fdff33f38920cf9434f86 diff --git a/trunk/drivers/staging/tidspbridge/pmgr/dspapi.c b/trunk/drivers/staging/tidspbridge/pmgr/dspapi.c index 1b0ab4ab1921..da08dfc64593 100644 --- a/trunk/drivers/staging/tidspbridge/pmgr/dspapi.c +++ b/trunk/drivers/staging/tidspbridge/pmgr/dspapi.c @@ -539,7 +539,7 @@ u32 mgrwrap_unregister_object(union trapped_args *args, void *pr_ctxt) */ u32 mgrwrap_wait_for_bridge_events(union trapped_args *args, void *pr_ctxt) { - int status = 0, real_status = 0; + int status = 0; struct dsp_notification *anotifications[MAX_EVENTS]; struct dsp_notification notifications[MAX_EVENTS]; u32 index, i; @@ -554,19 +554,21 @@ u32 mgrwrap_wait_for_bridge_events(union trapped_args *args, void *pr_ctxt) /* get the events */ for (i = 0; i < count; i++) { CP_FM_USR(¬ifications[i], anotifications[i], status, 1); - if (!status) { - /* set the array of pointers to kernel structures */ - anotifications[i] = ¬ifications[i]; + if (status || !notifications[i].handle) { + status = -EINVAL; + break; } + /* set the array of pointers to kernel structures */ + anotifications[i] = ¬ifications[i]; } if (!status) { - real_status = mgr_wait_for_bridge_events(anotifications, count, + status = mgr_wait_for_bridge_events(anotifications, count, &index, args->args_mgr_wait. utimeout); } CP_TO_USR(args->args_mgr_wait.pu_index, &index, status, 1); - return real_status; + return status; } /*