[PATCH v2 2/3] drm: add assertion for checking null edid to drm_edid_block_valid

Chris Wilson chris at chris-wilson.co.uk
Tue Jul 2 04:20:28 PDT 2013


On Tue, Jul 02, 2013 at 09:52:02AM +0900, Seung-Woo Kim wrote:
> If raw_edid of drm_edid_block_vaild() is null, it will crash, so
> checking in bad label is removed and instead assertion is added at
> the top of the function.
> The type of return for the function is bool, so it fixes to return
> true and false instead of 1 and 0.
> 
> Signed-off-by: Seung-Woo Kim <sw0312.kim at samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>

if (WARN_ON(raw_edid == NULL))
   return false;

Otherwise it is just a WARN_ON() followed by a BUG() :)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the dri-devel mailing list