ipm: imx: Fix possible buffer overflow

It is possible to happen a buffer overflow in ipm_send due the lack
of a checking for negative value.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
(cherry picked from commit 0a12a05e630b270e465cf5d92063b9676ebeb631)
diff --git a/drivers/ipm/ipm_imx.c b/drivers/ipm/ipm_imx.c
index f1205a4..511123b 100644
--- a/drivers/ipm/ipm_imx.c
+++ b/drivers/ipm/ipm_imx.c
@@ -174,7 +174,7 @@
 		return -EINVAL;
 	}
 
-	if (size > CONFIG_IPM_IMX_MAX_DATA_SIZE) {
+	if ((size < 0) || (size > CONFIG_IPM_IMX_MAX_DATA_SIZE)) {
 		return -EMSGSIZE;
 	}