check_deref: silence false positives
commit340a4fd1ad2745e9f29778eb6be51557fa733ade
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 14 Dec 2020 18:25:42 +0000 (14 21:25 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 14 Dec 2020 18:38:54 +0000 (14 21:38 +0300)
treebb7a910eb500905c5edc209c5ebf2c106c7a467c
parent6fc91e732824dc04349cd10ffc309e29a633dbf9
check_deref: silence false positives

Smatch had a bug because it complained about:

    drivers/gpu/drm/drm_color_mgmt.c:307 drm_crtc_legacy_gamma_set()
    error: potential null dereference 'blob'.  (drm_property_create_blob returns null)

The problem is that drm_crtc_legacy_gamma_set() returns error pointers and
not NULL.  This didn't trigger if the database was built (which is how I
normally test it) but it does trigger for almost everyone else.

My new patch effectively silences this check unless the database is built
which is slightly unfortunate but probably the solution going forward.

Reported-by: Philip Li <philip.li@intel.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_deref.c