linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / security / selinux / avc.c
index a300702..ac5d69b 100644 (file)
@@ -800,7 +800,7 @@ out:
 int avc_ss_reset(u32 seqno)
 {
        struct avc_callback_node *c;
-       int i, rc = 0, tmprc;
+       int i, rc = 0;
        unsigned long flag;
        struct avc_node *node;
 
@@ -813,16 +813,15 @@ int avc_ss_reset(u32 seqno)
 
        for (c = avc_callbacks; c; c = c->next) {
                if (c->events & AVC_CALLBACK_RESET) {
-                       tmprc = c->callback(AVC_CALLBACK_RESET,
-                                           0, 0, 0, 0, NULL);
-                       /* save the first error encountered for the return
-                          value and continue processing the callbacks */
-                       if (!rc)
-                               rc = tmprc;
+                       rc = c->callback(AVC_CALLBACK_RESET,
+                                        0, 0, 0, 0, NULL);
+                       if (rc)
+                               goto out;
                }
        }
 
        avc_latest_notif_update(seqno, 0);
+out:
        return rc;
 }