Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95349fe8 authored by Dmitry Torokhov's avatar Dmitry Torokhov
Browse files

Input: libps2 - warn instead of oopsing when passed bad arguments



This is more user-friendly and also fixes Coverity #id 249

Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 69975619
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -177,6 +177,11 @@ int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command)
		return -1;
	}

	if (send && !param) {
		WARN_ON(1);
		return -1;
	}

	mutex_lock_nested(&ps2dev->cmd_mutex, SINGLE_DEPTH_NESTING);

	serio_pause_rx(ps2dev->serio);