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

Commit 46601170 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"

parents f426c202 c140b8f8
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -104,7 +104,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;
	}
@@ -172,7 +172,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;
	}
@@ -493,7 +493,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;
	}
@@ -538,7 +538,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);
@@ -624,7 +624,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),
@@ -745,7 +745,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
@@ -1130,7 +1130,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);
@@ -1248,7 +1248,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)) {
@@ -1320,7 +1320,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;