Re: [PATCH] infiniband: avoid uninitialized variable warning in create_udata

From: Leon Romanovsky
Date: Sat Nov 11 2017 - 04:21:33 EST


On Fri, Nov 10, 2017 at 11:10:31PM +0100, Arnd Bergmann wrote:
> As Dan pointed out, the rework I did makes it harder for smatch and other
> static checkers to figure out what is going on with the uninitialized
> pointers.
>
> By open-coding the call in create_udata(), we make it more readable for
> both humans and tools.
>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Fixes: 12f727721eee ("IB/uverbs: clean up INIT_UDATA_BUF_OR_NULL usage")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
> drivers/infiniband/core/uverbs_std_types.c | 21 ++++++++++-----------
> 1 file changed, 10 insertions(+), 11 deletions(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature