[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200415.123344.555133895779578194.davem@davemloft.net>
Date: Wed, 15 Apr 2020 12:33:44 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: jgg@...pe.ca
Cc: santosh.shilimkar@...cle.com, linux-rdma@...r.kernel.org,
netdev@...r.kernel.org, rds-devel@....oracle.com
Subject: Re: [PATCH] net/rds: Use ERR_PTR for rds_message_alloc_sgs()
From: Jason Gunthorpe <jgg@...pe.ca>
Date: Tue, 14 Apr 2020 20:02:07 -0300
> From: Jason Gunthorpe <jgg@...lanox.com>
>
> Returning the error code via a 'int *ret' when the function returns a
> pointer is very un-kernely and causes gcc 10's static analysis to choke:
>
> net/rds/message.c: In function ‘rds_message_map_pages’:
> net/rds/message.c:358:10: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> 358 | return ERR_PTR(ret);
>
> Use a typical ERR_PTR return instead.
>
> Signed-off-by: Jason Gunthorpe <jgg@...lanox.com>
Applied, thanks.
Powered by blists - more mailing lists