tools:iio:iio_event_monitor: save right errno
authorHartmut Knaack <knaack.h@gmx.de>
Sun, 31 May 2015 12:39:49 +0000 (14:39 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 31 May 2015 16:34:05 +0000 (17:34 +0100)
commit5fdb8c6127c3c594360fb5f2959a724809c0032e
treee4d479970a72bb4ca332f9515e1ef8ff7cd4a0e7
parent2b6a6e67af6f8f644a48f75efc1f44544c0d74f6
tools:iio:iio_event_monitor: save right errno

Move up error handling code to preserve the errno coming from ioctl(),
before it may be changed by close().

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
tools/iio/iio_event_monitor.c