Re: [PATCH] vfio: check iommu_group_set_name() return value
From: Jason Gunthorpe
Date: Wed Jun 29 2022 - 13:54:52 EST
On Sat, Jun 25, 2022 at 07:42:39PM +0800, Liam Ni wrote:
> As iommu_group_set_name() can fail,we should check the return value.
>
> Signed-off-by: Liam Ni <zhiguangni01@xxxxxxxxx>
> ---
> drivers/vfio/vfio.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
I prefer this - but notice it is not a bug because if
iommu_group_set_name() fails then iommu_group_add_device() will return
-ENOMEM.
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
Jason