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

Commit 54af5ac8 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/dp: fix error checking for memory allocations" into dev/msm-4.14-display

parents b4a971eb 74528bc8
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ static ssize_t dp_debug_write_edid(struct file *file,
	size = min_t(size_t, count, SZ_1K);

	buf = kzalloc(size, GFP_KERNEL);
	if (!buf) {
	if (ZERO_OR_NULL_PTR(buf)) {
		rc = -ENOMEM;
		goto bail;
	}
@@ -173,7 +173,7 @@ static ssize_t dp_debug_write_dpcd(struct file *file,
	size = min_t(size_t, count, SZ_2K);

	buf = kzalloc(size, GFP_KERNEL);
	if (!buf) {
	if (ZERO_OR_NULL_PTR(buf)) {
		rc = -ENOMEM;
		goto bail;
	}
@@ -447,7 +447,7 @@ static ssize_t dp_debug_max_pclk_khz_read(struct file *file,
		return 0;

	buf = kzalloc(SZ_4K, GFP_KERNEL);
	if (!buf)
	if (ZERO_OR_NULL_PTR(buf))
		return -ENOMEM;

	len += snprintf(buf + len, (SZ_4K - len),
@@ -625,7 +625,7 @@ static ssize_t dp_debug_read_edid_modes(struct file *file,
		goto error;

	buf = kzalloc(SZ_4K, GFP_KERNEL);
	if (!buf) {
	if (ZERO_OR_NULL_PTR(buf)) {
		rc = -ENOMEM;
		goto error;
	}
@@ -670,7 +670,7 @@ static ssize_t dp_debug_read_info(struct file *file, char __user *user_buff,
		return 0;

	buf = kzalloc(SZ_4K, GFP_KERNEL);
	if (!buf)
	if (ZERO_OR_NULL_PTR(buf))
		return -ENOMEM;

	rc = snprintf(buf + len, max_size, "\tstate=0x%x\n", debug->aux->state);
@@ -756,7 +756,7 @@ static ssize_t dp_debug_bw_code_read(struct file *file,
		return 0;

	buf = kzalloc(SZ_4K, GFP_KERNEL);
	if (!buf)
	if (ZERO_OR_NULL_PTR(buf))
		return -ENOMEM;

	len += snprintf(buf + len, (SZ_4K - len),
@@ -877,7 +877,7 @@ static ssize_t dp_debug_read_hdr(struct file *file,
		goto error;

	buf = kzalloc(SZ_4K, GFP_KERNEL);
	if (!buf) {
	if (ZERO_OR_NULL_PTR(buf)) {
		rc = -ENOMEM;
		goto error;
	}
+3 −3
Original line number Diff line number Diff line
@@ -1103,7 +1103,7 @@ static ssize_t debugfs_misr_read(struct file *file,
		return 0;

	buf = kzalloc(max_len, GFP_KERNEL);
	if (!buf)
	if (ZERO_OR_NULL_PTR(buf))
		return -ENOMEM;

	mutex_lock(&display->display_lock);
@@ -1221,7 +1221,7 @@ static ssize_t debugfs_alter_esd_check_mode(struct file *file,
		return 0;

	buf = kzalloc(len, GFP_KERNEL);
	if (!buf)
	if (ZERO_OR_NULL_PTR(buf))
		return -ENOMEM;

	if (copy_from_user(buf, user_buf, user_len)) {
@@ -1292,7 +1292,7 @@ static ssize_t debugfs_read_esd_check_mode(struct file *file,
	}

	buf = kzalloc(len, GFP_KERNEL);
	if (!buf)
	if (ZERO_OR_NULL_PTR(buf))
		return -ENOMEM;

	esd_config = &display->panel->esd_config;