From e384b69a35ae96055774dbce9dea813043e21142 Mon Sep 17 00:00:00 2001 From: Aya Mahfouz Date: Tue, 3 Mar 2015 16:27:37 +0200 Subject: [PATCH] staging: iio: meter: add check on return variables adds checks on variables that are used to return values. If the value is less than zero, this indicates that an error occurred and hence a message is printed through dev_err. Checks are made on negative values only since spi_* functions return negative error codes. The functions were found using the following script but the aforementioned modification was what was carried out in the end: @@ identifier len,f; @@ -int len; ... when != len when strict -len = +return f(...); -return len; Signed-off-by: Aya Mahfouz Reviewed-by: Daniel Baluta Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed