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

Commit 70dce4b4 authored by Puranam V G Tejaswi's avatar Puranam V G Tejaswi Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Assign a default value to the variable ret



Currently there is a chance that the variable ret can be
used uninitialized in kgsl_reclaim_callback. Assign a default
value to ret to avoid this.

Change-Id: I90014370773ee2a6594ee624f890fead955e6f76
Signed-off-by: default avatarPuranam V G Tejaswi <quic_pvgtejas@quicinc.com>
parent 2f7f916c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -199,7 +199,7 @@ static int kgsl_reclaim_callback(struct notifier_block *nb,
	struct kgsl_process_private *p, *process = NULL;
	struct kgsl_mem_entry *entry;
	struct kgsl_memdesc *memdesc;
	int valid_entry, next = 0, ret;
	int valid_entry, next = 0, ret = NOTIFY_OK;

	spin_lock(&kgsl_driver.proclist_lock);
	list_for_each_entry(p, &kgsl_driver.process_list, list) {
@@ -212,7 +212,7 @@ static int kgsl_reclaim_callback(struct notifier_block *nb,
	spin_unlock(&kgsl_driver.proclist_lock);

	if (!process)
		return NOTIFY_OK;
		return ret;

	/*
	 * If we do not get the lock here, it means that the buffers are