lkml.org 
[lkml]   [2018]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [net-next] sctp: fix unused lable warning
On Wed, Mar 28, 2018 at 04:14:56PM +0200, Arnd Bergmann wrote:
> The proc file cleanup left a label possibly unused:
>
> net/sctp/protocol.c: In function 'sctp_defaults_init':
> net/sctp/protocol.c:1304:1: error: label 'err_init_proc' defined but not used [-Werror=unused-label]
>
> This adds an #ifdef around it to match the respective 'goto'.
>
> Fixes: d47d08c8ca05 ("sctp: use proc_remove_subtree()")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> net/sctp/protocol.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
> index c1c64b78c39d..d685f8456762 100644
> --- a/net/sctp/protocol.c
> +++ b/net/sctp/protocol.c
> @@ -1301,8 +1301,10 @@ static int __net_init sctp_defaults_init(struct net *net)
>
> return 0;
>
> +#ifdef CONFIG_PROC_FS
> err_init_proc:
> cleanup_sctp_mibs(net);
> +#endif
> err_init_mibs:
> sctp_sysctl_net_unregister(net);
> err_sysctl_register:
> --
> 2.9.0
>
>
Acked-by: Neil Horman <nhorman@tuxdriver.com>

\
 
 \ /
  Last update: 2018-03-28 17:19    [W:0.040 / U:1.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site