Re: [PATCH] vfio: platform: ignore missing reset if disabled at module init

From: Eric Auger
Date: Mon Jan 30 2023 - 04:54:35 EST


Hi,

On 1/30/23 10:05, Tian, Kevin wrote:
>> From: Tomasz Duszynski <tduszynski@xxxxxxxxxxx>
>> Sent: Thursday, January 26, 2023 12:11 AM
>> @@ -653,7 +653,8 @@ int vfio_platform_init_common(struct
>> vfio_platform_device *vdev)
>> if (ret && vdev->reset_required)
>> dev_err(dev, "No reset function found for device %s\n",
>> vdev->name);
>> - return ret;
>> +
>> + return vdev->reset_required ? ret : 0;
>> }
>> EXPORT_SYMBOL_GPL(vfio_platform_init_common);
> It reads slightly better to me as below:
>
> if (ret & vdev->reset_required) {
> dev_err(...);
> return ret;
> }
>
> return 0;
>
agreed.

Thanks

Eric