Reset device fd upon error condition in handle_inotify()

If an error is encountered while adding a new device in inotify
handling, make sure the fd is marked invalid (-1).

Signed-off-by: Peter Hurley <phurley@charter.net>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
1 file changed