Soc: msm: qdsp6v2: Fix invalid params handling

when ion_import_legacy api fails then we should not
call ion_free as the handle returned is not proper to
dereference so instead just destroy the ion client and
bail out.Sanity checks for all the input params is also
added.

Change-Id: I6c51986bf2ce334ff7405e38a12c1c1db50e2417
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Signed-off-by: flar2 <asegaert@gmail.com>