diff --git a/services/src/uevent.c b/services/src/uevent.c index 43caecbddca580cf7f1e6f6ea16cbcae52355b61..759a3401271dbeea760b03b884bec03dec6b2435 100644 --- a/services/src/uevent.c +++ b/services/src/uevent.c @@ -219,6 +219,8 @@ static void InitUevent(struct Uevent *event) event->partitionName = ""; event->deviceName = ""; event->partitionNum = -1; + event->major = -1; + event->minor = -1; } static inline const char *ParseUeventMessage(const char **buf, const char *name) @@ -607,7 +609,6 @@ static void HandlePlatformDevice(const struct Uevent *event) static const char *ParseDeviceName(const struct Uevent *uevent, unsigned int len) { INIT_CHECK_RETURN_VALUE(uevent->major >= 0 && uevent->minor >= 0, NULL); - INIT_CHECK_RETURN_VALUE(uevent->deviceName != NULL && uevent->deviceName[0] != '\0', NULL); const char *name = strrchr(uevent->path, '/'); INIT_CHECK_RETURN_VALUE(name != NULL, NULL);