• Damien Lespiau's avatar
    drm: Use the type of the array element when reallocating · 14f476fa
    Damien Lespiau authored
    Static analysers find it 'suspicious', that we're trying to allocate memory for
    elements of size sizeof(struct drm_fb_helper_connector) when the array is
    defined as struct drm_fb_helper_connector **.
    
    Use sizeof(struct drm_fb_helper_connector *) instead.
    
    Note that the structure being defined as:
    
    struct drm_fb_helper_connector {
    	struct drm_connector *connector;
    };
    
    This was still doing the right thing, but may not in the future if
    additional fields are added.
    
    Cc: Todd Previte <tprevite@gmail.com>
    Cc: Dave Airlie <airlied@redhat.com>
    Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    14f476fa
drm_fb_helper.c 47.4 KB