Fix erroneous infinite loop in MTP inotify_t

Change-Id: I60ce40bd08e2ce9b04beb5dc4876b86f3688861b
diff --git a/mtp/MtpStorage.cpp b/mtp/MtpStorage.cpp
index 1f4d142..5a69548 100755
--- a/mtp/MtpStorage.cpp
+++ b/mtp/MtpStorage.cpp
@@ -714,7 +714,7 @@
 			MTPE("inotify_t Can't read inotify events\n");
 		}
 
-		while (inotify_thread_kill.get_value() == 0) {
+		while (i < len && inotify_thread_kill.get_value() == 0) {
 			struct inotify_event *event = (struct inotify_event *) &buf[i];
 			if (event->len) {
 				MTPD("inotify event: wd: %i, mask: %x, name: %s\n", event->wd, event->mask, event->name);