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

Commit 56048983 authored by Shubhraprakash Das's avatar Shubhraprakash Das
Browse files

msm: kgsl: Dump snapshot only once



If a snapshot has already been pulled then do not dump it again.
Check this condition to return early from dump function.

Change-Id: If0bfaf101b3dde60152371f04f63a9c3388685e3
Signed-off-by: default avatarShubhraprakash Das <sadas@codeaurora.org>
parent 219364c5
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -786,6 +786,9 @@ static ssize_t snapshot_show(struct file *filep, struct kobject *kobj,

	obj_itr_init(&itr, buf, off, count);

	if (0 == device->snapshot_frozen)
		goto done;

	ret = obj_itr_out(&itr, device->snapshot, device->snapshot_size);

	if (ret == 0)