drm: omapdrm: Use sizeof(*var) instead of sizeof(type) for structures
By linking the sizeof to a variable type the code will be less prone to bugs due to future type changes of variables. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
@@ -119,8 +119,7 @@ static void __init omapdss_omapify_node(struct device_node *node)
|
||||
|
||||
static void __init omapdss_add_to_list(struct device_node *node, bool root)
|
||||
{
|
||||
struct dss_conv_node *n = kmalloc(sizeof(struct dss_conv_node),
|
||||
GFP_KERNEL);
|
||||
struct dss_conv_node *n = kmalloc(sizeof(*n), GFP_KERNEL);
|
||||
if (n) {
|
||||
n->node = node;
|
||||
n->root = root;
|
||||
|
Reference in New Issue
Block a user