drm: Use the type of the array element when reallocating
authorDamien Lespiau <damien.lespiau@intel.com>
Fri, 8 Aug 2014 18:15:20 +0000 (19:15 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 14 Aug 2014 19:24:30 +0000 (21:24 +0200)
commit14f476fa24e81d0beea1aa14d763102958518d60
treecd55c05d9c0cbeaf2e253a17041408b14747106f
parentc11cda52193dfa459dfea38f00b19bc9325fa922
drm: Use the type of the array element when reallocating

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: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_fb_helper.c