diff options
| author | Tiezhu Yang <[email protected]> | 2020-02-13 12:16:07 +0800 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2020-02-13 13:17:39 +0000 |
| commit | 470a072e12200576788dc622d58894609feae2d7 (patch) | |
| tree | fdf990e9665f3f1dbc29fcf73140ad8b5b08e0ed /scripts/gdb/linux/device.py | |
| parent | 1f3c36328a487059beebd1f7be042e3b7abf7d34 (diff) | |
spi: spidev_test: Use perror() only if errno is not 0
It is better to use perror() only if errno is not 0, it should use printf()
when errno is 0, otherwise there exists redudant ": Success".
E.g. without this patch:
$ ./spidev_test -p 1234 --input test.bin
only one of -p and --input may be selected: Success
Aborted (core dumped)
With this patch:
$ ./spidev_test -p 1234 --input test.bin
only one of -p and --input may be selected
Aborted (core dumped)
Signed-off-by: Tiezhu Yang <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/device.py')
0 files changed, 0 insertions, 0 deletions