Commit c8d22938 authored by Peter Hutterer's avatar Peter Hutterer

Remove superfluous check for next being NULL

is_libinput_device(next) causes a dereference of next anyway, so this cannot
ever be NULL.

Besides, if next ends up as NULL that means we have lost count of how many
remaining devices use libinput, so we have other issues.

Found by coverity.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent a7014aa8
......@@ -1162,8 +1162,7 @@ swap_registered_device(InputInfoPtr pInfo)
int sigstate = xf86BlockSIGIO();
#endif
xf86RemoveEnabledDevice(pInfo);
if (next) /* shouldn't ever be NULL anyway */
xf86AddEnabledDevice(next);
xf86AddEnabledDevice(next);
driver_context.registered_InputInfoPtr = next;
#if HAVE_THREADED_INPUT
input_unlock();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment