soc: qcom: fix to avoid memory allocation failures

Currenlty wdsp_glink_write() API allocates 256KB buffer and free
after it is transferred to glink. But this may result in memory
allocation failures in low memory situations. Fix this issue by
allocating the required size and validate it to avoid overflow.

Change-Id: I891e4361aa5f24c5a518b3acb1d7cf6a9baa5bdf
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
1 file changed