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

Commit c32734d1 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "disp: msm: sde: fix null access for wb modes"

parents 0ab21016 6da86cce
Loading
Loading
Loading
Loading
+48 −44
Original line number Diff line number Diff line
@@ -170,7 +170,12 @@ int sde_wb_connector_set_modes(struct sde_wb_device *wb_dev,
	if (connected) {
		SDE_DEBUG("connect\n");

		if (count_modes && modes) {
		if (!count_modes || !modes) {
			SDE_ERROR("invalid count_modes :%u and modes :%d\n",
				count_modes, !modes);
			return -EINVAL;
		}

		modeinfo = kcalloc(count_modes,
				sizeof(struct drm_mode_modeinfo),
				GFP_KERNEL);
@@ -218,7 +223,6 @@ int sde_wb_connector_set_modes(struct sde_wb_device *wb_dev,
				goto error;
			}
		}
		}

		if (wb_dev->modes) {
			wb_dev->count_modes = 0;