diag: Exit from the loop if there is no data available to read

Currently if there is no data available to be read on DIAG_CNTL
channel, apps diag is waiting to read further data. This patch
removes the waiting logic and exit from the loop if there is no
data available to read.

Change-Id: Ic6041b3254f492353751db65704afa96bd8db274
CRs-Fixed: 750885
Signed-off-by: Katish Paran <kparan@codeaurora.org>
Merge "diag: Exit from the loop if there is no data available to read"