Without this two error messages are printed when rfkill device
cannot be opened.
$ rfkill
rfkill: cannot open /dev/rfkill: No such file or directory
rfkill: cannot read /dev/rfkill: Bad file descriptor
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
}
fd = rfkill_ro_open(1);
+ if (fd < 0)
+ return -errno;
while (1) {
rc = rfkill_read_event(fd, &event);
}
fd = rfkill_ro_open(1);
+ if (fd < 0)
+ return -errno;
while (1) {
rc = rfkill_read_event(fd, &event);