[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250223112822.GZ53094@unreal>
Date: Sun, 23 Feb 2025 13:28:22 +0200
From: Leon Romanovsky <leon@...nel.org>
To: Long Li <longli@...rosoft.com>
Cc: Kees Bakker <kees@...erbout.nl>,
Konstantin Taranov <kotaranov@...rosoft.com>,
Jason Gunthorpe <jgg@...pe.ca>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [EXTERNAL] [PATCH] RDMA/mana_ib: Ensure variable err is
initialized
On Fri, Feb 21, 2025 at 08:34:43PM +0000, Long Li wrote:
> > Subject: [EXTERNAL] [PATCH] RDMA/mana_ib: Ensure variable err is initialized
> >
> > [Some people who received this message don't often get email from
> > kees@...erbout.nl. Learn why this is important at
> > https://aka.ms/LearnAboutSenderIdentification ]
> >
> > In the function mana_ib_gd_create_dma_region if there are no dma blocks to
> > process the variable `err` remains uninitialized.
> >
> > Fixes: 0266a177631d ("RDMA/mana_ib: Add a driver for Microsoft Azure
> > Network Adapter")
> > Signed-off-by: Kees Bakker <kees@...erbout.nl>
>
> I think it's an impossible condition, but the patch looks good to me.
Agree, it is impossible.
>
> Reviewed-by: Long Li <longli@...rosoft.com>
Thanks
>
> > ---
> > drivers/infiniband/hw/mana/main.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/infiniband/hw/mana/main.c
> > b/drivers/infiniband/hw/mana/main.c
> > index 114ca8c509ce..eda9c5b971de 100644
> > --- a/drivers/infiniband/hw/mana/main.c
> > +++ b/drivers/infiniband/hw/mana/main.c
> > @@ -384,7 +384,7 @@ static int mana_ib_gd_create_dma_region(struct
> > mana_ib_dev *dev, struct ib_umem
> > unsigned int tail = 0;
> > u64 *page_addr_list;
> > void *request_buf;
> > - int err;
> > + int err = 0;
> >
> > gc = mdev_to_gc(dev);
> > hwc = gc->hwc.driver_data;
> > --
> > 2.48.1
>
Powered by blists - more mailing lists