Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1449101 > unrolled thread

Re: [PATCH] cdrom: Delete an unnecessary check before unregister_sysctl_table()

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2016-07-24 11:50 +0200
Last post2016-07-24 11:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] cdrom: Delete an unnecessary check before  unregister_sysctl_table() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-24 11:50 +0200

#1449101 — Re: [PATCH] cdrom: Delete an unnecessary check before unregister_sysctl_table()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-07-24 11:50 +0200
SubjectRe: [PATCH] cdrom: Delete an unnecessary check before unregister_sysctl_table()
Message-ID<rYocN-6gG-3@gated-at.bofh.it>
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 9 Jul 2015 09:52:24 +0200
> 
> The unregister_sysctl_table() function tests whether its argument is NULL
> and then returns immediately. Thus the test around the call is not needed.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  drivers/cdrom/cdrom.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
> index 5d28a45..e43e84d 100644
> --- a/drivers/cdrom/cdrom.c
> +++ b/drivers/cdrom/cdrom.c
> @@ -3698,8 +3698,7 @@ static void cdrom_sysctl_register(void)
>  
>  static void cdrom_sysctl_unregister(void)
>  {
> -	if (cdrom_sysctl_header)
> -		unregister_sysctl_table(cdrom_sysctl_header);
> +	unregister_sysctl_table(cdrom_sysctl_header);
>  }
>  
>  #else /* CONFIG_SYSCTL */
> 

How do you think about to integrate this update suggestion
into another source code repository?

Regards,
Markus

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web