kernel: ERR_PTR() basically only returns negatives and the occasional NULL
commitd8bea5e949ba2c77f4411b092db0d01c97d8397d
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 23 May 2017 08:28:57 +0000 (23 11:28 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 23 May 2017 08:28:57 +0000 (23 11:28 +0300)
tree876b77227641f41eac0de41093762c7686297be7
parent5a49d6669f3a41db0760c30791db9d9253140a8e
kernel: ERR_PTR() basically only returns negatives and the occasional NULL

Say we don't know what a function returns, but we know that the result
is passed to ERR_PTR().  That probably means it's an ERR_PTR().  We
sometimes also pass NULLs to ERR_PTR() as well.  But we basically
shouldn't be passing positive values to ERR_PTR().

I've added a hack in check_kernel.c to force this behavior.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_kernel.c