Skip to content

Commit

Permalink
exit/rtl8712: Replace the macro thread_exit with a simple return 0
Browse files Browse the repository at this point in the history
The macro thread_exit is called is at the end of a function started
with kthread_run.  The code in kthread_run has arranged things so a
kernel thread can just return and do_exit will be called.

So just have the cmd_thread return instead of calling complete_and_exit.

Link: https://lkml.kernel.org/r/20211020174406.17889-19-ebiederm@xmission.com
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
  • Loading branch information
Eric W. Biederman committed Oct 29, 2021
1 parent 501c887 commit 99d7ef1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion drivers/staging/rtl8712/osdep_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ struct __queue {

#define _pkt struct sk_buff
#define _buffer unsigned char
#define thread_exit() complete_and_exit(NULL, 0)

#define _init_queue(pqueue) \
do { \
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/rtl8712/rtl8712_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ int r8712_cmd_thread(void *context)
r8712_free_cmd_obj(pcmd);
} while (1);
complete(&pcmdpriv->terminate_cmdthread_comp);
thread_exit();
return 0;
}

void r8712_event_handle(struct _adapter *padapter, __le32 *peventbuf)
Expand Down

0 comments on commit 99d7ef1

Please sign in to comment.