From: Aya Mahfouz Date: Tue, 3 Mar 2015 14:27:37 +0000 (+0200) Subject: staging: iio: meter: add check on return variables X-Git-Tag: omap-for-v4.2/o2_dc~155^2~138^2~650 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e384b69a35ae96055774dbce9dea813043e21142;p=pandora-kernel.git 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-diff-tree failed