Files
linux-nv-oot/drivers/block
Jon Hunter 06b833d570 block: virt-storage: tegra: Fix build for Linux v5.14
For Linux v5.14, the function device_add_disk() has a void return type
and compilation now fails with ...

 nvidia-oot/drivers/block/tegra_virt_storage/tegra_hv_vblk.c:1162:8:
 error: invalid use of void expression
  1162 |  (void)!device_add_disk(vblkdev->device, vblkdev->gd, NULL);
       |        ^

Fix the build for kernels prior to v5.15 by not attempting to  access
the return value. Finally, for kernels v5.15 and newer, do not ignore
the return value and report an error if device_add_disk() fails.

Bug 4052299

Change-Id: I975f30bc67661eacf74634b5edb70e5ad5fc1a8d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2881453
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-05 06:05:05 -07:00
..