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

Commit 755eb72b 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: Avoid a possible pointer deference in __force_on_show"

parents 63af0670 0c89843a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -648,10 +648,10 @@ static ssize_t __force_on_show(struct device *dev,
					char *buf, int flag)
{
	struct kgsl_device *device = kgsl_device_from_dev(dev);
	int i = test_bit(flag, &device->pwrctrl.ctrl_flags);
	if (device == NULL)
		return 0;
	return snprintf(buf, PAGE_SIZE, "%d\n", i);
	return snprintf(buf, PAGE_SIZE, "%d\n",
		test_bit(flag, &device->pwrctrl.ctrl_flags));
}

static ssize_t __force_on_store(struct device *dev,