[LTP] [PATCH] lib: tst_detach_device_by_fd() set dev_fd to -1

Petr Vorel pvorel@suse.cz
Tue Oct 7 15:49:04 CEST 2025


Hi Cyril,

> Apparently I tend to forget that tst_detach_device_by_fd() closes the
> file descriptor. This change makes it more obvious by chaning the fd to
> a pointer and also sets the dev_fd to -1, which matches the SAFE_CLOSE()
> behavior.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr


More information about the ltp mailing list