vibrator: Fix check for no of bytes in Slate SSR monitor thread

No of bytes returned by uevent_kernel_multicast_recv() can be 0 or
equal to 1025 bytes. Add change to remove '=' check in Slate SSR
monitor thread to fix the issue of thread not processing UEVENTs
because of wrong check.

Change-Id: I6d8c35a758371b853b545e3eece2fd7788a1424e
This commit is contained in:
Umang Chheda
2022-02-07 15:56:22 +05:30
committed by Michael Bestas
parent 630fd3d763
commit d3d75f3ddd

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, The Linux Foundation. All rights reserved. * Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are * modification, are permitted provided that the following conditions are
@@ -82,7 +83,7 @@ void PatternOffload::SSREventListener(void)
} }
while ((n = uevent_kernel_multicast_recv(device_fd, msg, UEVENT_MSG_LEN)) > 0) { while ((n = uevent_kernel_multicast_recv(device_fd, msg, UEVENT_MSG_LEN)) > 0) {
if (n <= 0 || n >= UEVENT_MSG_LEN) { if (n <= 0 || n > UEVENT_MSG_LEN) {
ALOGE("Message length %d is not correct\n", n); ALOGE("Message length %d is not correct\n", n);
continue; continue;
} }