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

Commit 6e1787cf authored by Lloyd Atkinson's avatar Lloyd Atkinson Committed by Rob Clark
Browse files

drm/msm/dsi: correct DSI id bounds check during registration



Check DSI instance id argument against the proper boundary size
to protect against invalid configuration of the DSI id.

Signed-off-by: default avatarLloyd Atkinson <latkinso@codeaurora.org>
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent f0efc831
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -862,7 +862,7 @@ int msm_dsi_manager_register(struct msm_dsi *msm_dsi)
	int id = msm_dsi->id;
	int ret;

	if (id > DSI_MAX) {
	if (id >= DSI_MAX) {
		pr_err("%s: invalid id %d\n", __func__, id);
		return -EINVAL;
	}