mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 03:00:54 +07:00
spi: spidev_test: Fix input file check when transferring file
Check the input file fd instead of spidev fd. The spidev fd is supposed to be OK otherwise the transfer_file() function would not be called at all. Signed-off-by: Michal Vokáč <vokac.m@gmail.com> Reviewed-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
1001354ca3
commit
e634b76caf
@ -315,7 +315,7 @@ static void transfer_file(int fd, char *filename)
|
||||
pabort("can't stat input file");
|
||||
|
||||
tx_fd = open(filename, O_RDONLY);
|
||||
if (fd < 0)
|
||||
if (tx_fd < 0)
|
||||
pabort("can't open input file");
|
||||
|
||||
tx = malloc(sb.st_size);
|
||||
|
Loading…
Reference in New Issue
Block a user