[inotify] fix possible unbound local error