Re: [PATCH] RDMA: remove null check after call container_of()

From: Jason Gunthorpe
Date: Tue May 17 2022 - 08:16:56 EST


On Tue, May 17, 2022 at 09:33:28AM +0800, Haowen Bai wrote:
> container_of() will never return NULL, so remove useless code.

It is confusing here, but it can be null. If you want to do this then
you have to split out the _ib_alloc_device call and check it
seperately.

Jason