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

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

Merge "msm: kgsl: Properly check error codes when allocating ringbuffer space"

parents 26810ecb eeeaaa77
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -680,8 +680,10 @@ int a3xx_rb_init(struct adreno_device *adreno_dev,
{
	unsigned int *cmds;
	cmds = adreno_ringbuffer_allocspace(rb, NULL, 18);
	if (IS_ERR(cmds))
		return PTR_ERR(cmds);
	if (cmds == NULL)
		return -ENOMEM;
		return -ENOSPC;

	*cmds++ = cp_type3_packet(CP_ME_INIT, 17);

+3 −2
Original line number Diff line number Diff line
@@ -387,8 +387,10 @@ static int _ringbuffer_bootstrap_ucode(struct adreno_ringbuffer *rb,
	adreno_writereg(adreno_dev, ADRENO_REG_CP_ME_CNTL, 0);

	cmds = adreno_ringbuffer_allocspace(rb, NULL, bootstrap_size);
	if (IS_ERR(cmds))
		return PTR_ERR(cmds);
	if (cmds == NULL)
			return -ENOMEM;
		return -ENOSPC;

	/* Construct the packet that bootsraps the ucode */
	*cmds++ = cp_type3_packet(CP_BOOTSTRAP_UCODE, (bootstrap_size - 1));
@@ -781,7 +783,6 @@ adreno_ringbuffer_addcmds(struct adreno_ringbuffer *rb,
		total_sizedwords += 9;

	ringcmds = adreno_ringbuffer_allocspace(rb, drawctxt, total_sizedwords);

	if (IS_ERR(ringcmds))
		return PTR_ERR(ringcmds);
	if (ringcmds == NULL)