ALSA: pcm: potential uninitialized return values
[pandora-kernel.git] / security / selinux / selinuxfs.c
index 55d92cb..bac8928 100644 (file)
@@ -75,8 +75,6 @@ static char policy_opened;
 /* global data for policy capabilities */
 static struct dentry *policycap_dir;
 
-extern void selnl_notify_setenforce(int val);
-
 /* Check whether a task is allowed to use a security operation. */
 static int task_has_security(struct task_struct *tsk,
                             u32 perms)
@@ -152,7 +150,7 @@ static ssize_t sel_write_enforce(struct file *file, const char __user *buf,
                goto out;
 
        /* No partial writes. */
-       length = EINVAL;
+       length = -EINVAL;
        if (*ppos != 0)
                goto out;
 
@@ -278,7 +276,6 @@ static ssize_t sel_write_disable(struct file *file, const char __user *buf,
        char *page = NULL;
        ssize_t length;
        int new_value;
-       extern int selinux_disable(void);
 
        length = -ENOMEM;
        if (count >= PAGE_SIZE)
@@ -478,7 +475,7 @@ static struct vm_operations_struct sel_mmap_policy_ops = {
        .page_mkwrite = sel_mmap_policy_fault,
 };
 
-int sel_mmap_policy(struct file *filp, struct vm_area_struct *vma)
+static int sel_mmap_policy(struct file *filp, struct vm_area_struct *vma)
 {
        if (vma->vm_flags & VM_SHARED) {
                /* do not allow mprotect to make mapping writable */
@@ -1200,7 +1197,7 @@ static void sel_remove_entries(struct dentry *de)
        spin_lock(&de->d_lock);
        node = de->d_subdirs.next;
        while (node != &de->d_subdirs) {
-               struct dentry *d = list_entry(node, struct dentry, d_u.d_child);
+               struct dentry *d = list_entry(node, struct dentry, d_child);
 
                spin_lock_nested(&d->d_lock, DENTRY_D_LOCK_NESTED);
                list_del_init(node);
@@ -1241,6 +1238,7 @@ static int sel_make_bools(void)
                kfree(bool_pending_names[i]);
        kfree(bool_pending_names);
        kfree(bool_pending_values);
+       bool_num = 0;
        bool_pending_names = NULL;
        bool_pending_values = NULL;
 
@@ -1706,12 +1704,12 @@ static void sel_remove_classes(void)
 
        list_for_each(class_node, &class_dir->d_subdirs) {
                struct dentry *class_subdir = list_entry(class_node,
-                                       struct dentry, d_u.d_child);
+                                       struct dentry, d_child);
                struct list_head *class_subdir_node;
 
                list_for_each(class_subdir_node, &class_subdir->d_subdirs) {
                        struct dentry *d = list_entry(class_subdir_node,
-                                               struct dentry, d_u.d_child);
+                                               struct dentry, d_child);
 
                        if (d->d_inode)
                                if (d->d_inode->i_mode & S_IFDIR)