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

Commit c501758b authored by Manoj Prabhu B's avatar Manoj Prabhu B
Browse files

diag: Return proper value in error case



Presently for error cases return value is improperly updated.
Proper handling is added in error cases to maintain proper return
value.

Change-Id: I771124b8a1eaa29a2eca246cd8c1457309745a85
Signed-off-by: default avatarManoj Prabhu B <bmanoj@codeaurora.org>
parent c4f81831
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -183,6 +183,7 @@ do { \
	if ((count < ret+length) || (copy_to_user(buf,		\
			(void *)&data, length))) {		\
		ret = -EFAULT;					\
		break;							\
	}							\
	ret += length;						\
} while (0)