lkml.org 
[lkml]   [2016]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/17] s390/debug: Return directly if a null pointer was passed to debug_unregister()


Am 03.09.2016 14:24, schrieb SF Markus Elfring:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 1 Sep 2016 19:34:45 +0200
>
> Return directly at the beginning if a null pointer was passed for
> the input parameter of this function.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> arch/s390/kernel/debug.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
> index c4a4641..d137150 100644
> --- a/arch/s390/kernel/debug.c
> +++ b/arch/s390/kernel/debug.c
> @@ -736,13 +736,10 @@ void
> debug_unregister(debug_info_t * id)
> {
> if (!id)
> - goto out;
> + return;
> mutex_lock(&debug_mutex);
> debug_info_put(id);
> mutex_unlock(&debug_mutex);
> -
> -out:
> - return;
> }
> EXPORT_SYMBOL(debug_unregister);
>

debug_info_put() will check for NULL, the whole check can be removed.

re,
wh

\
 
 \ /
  Last update: 2016-09-17 09:58    [W:1.333 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site