err_ptr: use the actual values to silence false positives
commit8275cedc24555134f57d471e9db3612729374334
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 31 Jul 2015 09:41:58 +0000 (31 12:41 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 31 Jul 2015 09:41:58 +0000 (31 12:41 +0300)
treefdb6b03be918dcad598c9e4e1a3f2f2e06cfd39c
parent83a00b28ee25c8ead01b16008bfca5a77d74b8e8
err_ptr: use the actual values to silence false positives

This check used to work like this:
1) Make a list of functions which return ERR_PTR().
2) If the caller doesn't check for IS_ERR() before dereferencing then
complain.

The problem is that some functions instead of checking IS_ERR() directly
called to helper functions that checked for IS_ERR() along with other
types of validation.  Because of cross function analysis, then
smatch_extra.c understands that the pointer is not an ERR_PTR() but this
check would still complain because it wasn't using the value.

Fixed now.

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