Skip to content

Commit

Permalink
tomoyo_close_control: don't bother with return value
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Apr 29, 2013
1 parent fca660b commit e53cfda
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
5 changes: 1 addition & 4 deletions security/tomoyo/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2681,10 +2681,8 @@ ssize_t tomoyo_write_control(struct tomoyo_io_buffer *head,
* tomoyo_close_control - close() for /sys/kernel/security/tomoyo/ interface.
*
* @head: Pointer to "struct tomoyo_io_buffer".
*
* Returns 0.
*/
int tomoyo_close_control(struct tomoyo_io_buffer *head)
void tomoyo_close_control(struct tomoyo_io_buffer *head)
{
/*
* If the file is /sys/kernel/security/tomoyo/query , decrement the
Expand All @@ -2694,7 +2692,6 @@ int tomoyo_close_control(struct tomoyo_io_buffer *head)
atomic_dec_and_test(&tomoyo_query_observers))
wake_up_all(&tomoyo_answer_wait);
tomoyo_notify_gc(head, false);
return 0;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion security/tomoyo/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ const struct tomoyo_path_info *tomoyo_path_matches_group
(const struct tomoyo_path_info *pathname, const struct tomoyo_group *group);
int tomoyo_check_open_permission(struct tomoyo_domain_info *domain,
struct path *path, const int flag);
int tomoyo_close_control(struct tomoyo_io_buffer *head);
void tomoyo_close_control(struct tomoyo_io_buffer *head);
int tomoyo_env_perm(struct tomoyo_request_info *r, const char *env);
int tomoyo_execute_permission(struct tomoyo_request_info *r,
const struct tomoyo_path_info *filename);
Expand Down
5 changes: 2 additions & 3 deletions security/tomoyo/securityfs_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,13 @@ static int tomoyo_open(struct inode *inode, struct file *file)
/**
* tomoyo_release - close() for /sys/kernel/security/tomoyo/ interface.
*
* @inode: Pointer to "struct inode".
* @file: Pointer to "struct file".
*
* Returns 0 on success, negative value otherwise.
*/
static int tomoyo_release(struct inode *inode, struct file *file)
{
return tomoyo_close_control(file->private_data);
tomoyo_close_control(file->private_data);
return 0;
}

/**
Expand Down

0 comments on commit e53cfda

Please sign in to comment.