On Fri, Apr 19, 2019 at 8:01 AM Emil Velikov <[email protected]> wrote:
>
> From: Emil Velikov <[email protected]>
>
> The fd is -1, thus the block of if (fd != -1) close(fd) is dead code.
>
> Cc: Chad Versace <[email protected]>
> Cc: Chia-I Wu <[email protected]>
> Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Chia-I Wu <[email protected]>
> ---
> src/freedreno/vulkan/tu_device.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/src/freedreno/vulkan/tu_device.c
> b/src/freedreno/vulkan/tu_device.c
> index c7f4d0b26eb..1268624bd8d 100644
> --- a/src/freedreno/vulkan/tu_device.c
> +++ b/src/freedreno/vulkan/tu_device.c
> @@ -198,8 +198,6 @@ tu_physical_device_init(struct tu_physical_device *device,
>
> if (strcmp(version->name, "msm")) {
> drmFreeVersion(version);
> - if (master_fd != -1)
> - close(master_fd);
> close(fd);
> return vk_errorf(instance, VK_ERROR_INCOMPATIBLE_DRIVER,
> "device %s does not use the msm kernel driver", path);
> --
> 2.21.0
>
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev