Skip to content

Commit e53cfda

Browse files
author
Al Viro
committed
tomoyo_close_control: don't bother with return value
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent fca660b commit e53cfda

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

‎security/tomoyo/common.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2681,10 +2681,8 @@ ssize_t tomoyo_write_control(struct tomoyo_io_buffer *head,
26812681
* tomoyo_close_control - close() for /sys/kernel/security/tomoyo/ interface.
26822682
*
26832683
* @head: Pointer to "struct tomoyo_io_buffer".
2684-
*
2685-
* Returns 0.
26862684
*/
2687-
int tomoyo_close_control(struct tomoyo_io_buffer *head)
2685+
void tomoyo_close_control(struct tomoyo_io_buffer *head)
26882686
{
26892687
/*
26902688
* If the file is /sys/kernel/security/tomoyo/query , decrement the
@@ -2694,7 +2692,6 @@ int tomoyo_close_control(struct tomoyo_io_buffer *head)
26942692
atomic_dec_and_test(&tomoyo_query_observers))
26952693
wake_up_all(&tomoyo_answer_wait);
26962694
tomoyo_notify_gc(head, false);
2697-
return 0;
26982695
}
26992696

27002697
/**

‎security/tomoyo/common.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ const struct tomoyo_path_info *tomoyo_path_matches_group
958958
(const struct tomoyo_path_info *pathname, const struct tomoyo_group *group);
959959
int tomoyo_check_open_permission(struct tomoyo_domain_info *domain,
960960
struct path *path, const int flag);
961-
int tomoyo_close_control(struct tomoyo_io_buffer *head);
961+
void tomoyo_close_control(struct tomoyo_io_buffer *head);
962962
int tomoyo_env_perm(struct tomoyo_request_info *r, const char *env);
963963
int tomoyo_execute_permission(struct tomoyo_request_info *r,
964964
const struct tomoyo_path_info *filename);

‎security/tomoyo/securityfs_if.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,13 @@ static int tomoyo_open(struct inode *inode, struct file *file)
143143
/**
144144
* tomoyo_release - close() for /sys/kernel/security/tomoyo/ interface.
145145
*
146-
* @inode: Pointer to "struct inode".
147146
* @file: Pointer to "struct file".
148147
*
149-
* Returns 0 on success, negative value otherwise.
150148
*/
151149
static int tomoyo_release(struct inode *inode, struct file *file)
152150
{
153-
return tomoyo_close_control(file->private_data);
151+
tomoyo_close_control(file->private_data);
152+
return 0;
154153
}
155154

156155
/**

0 commit comments

Comments
 (0)