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

Commit ab872dd5 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/sde: fix null access for wb modes" into dev/msm-4.14-display

parents 4f4d53c5 6ae7f3f9
Loading
Loading
Loading
Loading
+47 −43
Original line number Diff line number Diff line
@@ -178,7 +178,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);
@@ -226,7 +231,6 @@ int sde_wb_connector_set_modes(struct sde_wb_device *wb_dev,
				goto error;
			}
		}
		}

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