[rds-devel] [PATCH] net/rds: Use ERR_PTR for rds_message_alloc_sgs()
santosh.shilimkar at oracle.com
santosh.shilimkar at oracle.com
Tue Apr 14 16:29:09 PDT 2020
On 4/14/20 4:02 PM, Jason Gunthorpe wrote:
> From: Jason Gunthorpe <jgg at mellanox.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 at mellanox.com>
> ---
Looks good Jason. Thanks !!
Acked-by: Santosh Shilimkar <santosh.shilimkar at oracle.com>
More information about the rds-devel
mailing list