kernel/signal: Remove unnecessary ‘NULL’ values from ucounts

Message ID 20230926022410.4280-1-kunyu@nfschina.com
State New
Headers
Series kernel/signal: Remove unnecessary ‘NULL’ values from ucounts |

Commit Message

Li kunyu Sept. 26, 2023, 2:24 a.m. UTC
  ucounts is assigned first, so it does not need to initialize the
assignment.

Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
 kernel/signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Oleg Nesterov Sept. 26, 2023, 9:52 p.m. UTC | #1
On 09/26, Li kunyu wrote:
>
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -415,7 +415,7 @@ __sigqueue_alloc(int sig, struct task_struct *t, gfp_t gfp_flags,
>  		 int override_rlimit, const unsigned int sigqueue_flags)
>  {
>  	struct sigqueue *q = NULL;
> -	struct ucounts *ucounts = NULL;
> +	struct ucounts *ucounts;
>  	long sigpending;

this looks obviously correct, so

Acked-by: Oleg Nesterov <oleg@redhat.com>


but you know, this change is so trivial, perhaps you should
resend this minor cleanup to kernel-janitors@vger.kernel.org

but let me add Andrew, perhaps he will take this patch...

Oleg.
  

Patch

diff --git a/kernel/signal.c b/kernel/signal.c
index 09019017d669..27f6cd37ac4f 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -415,7 +415,7 @@  __sigqueue_alloc(int sig, struct task_struct *t, gfp_t gfp_flags,
 		 int override_rlimit, const unsigned int sigqueue_flags)
 {
 	struct sigqueue *q = NULL;
-	struct ucounts *ucounts = NULL;
+	struct ucounts *ucounts;
 	long sigpending;
 
 	/*