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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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;




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux