[PATCH 06/14] GPU-DRM-OMAP: Improve a size determination in omap_dmm_probe()
SF Markus Elfring
elfring at users.sourceforge.net
Wed Sep 21 16:47:43 UTC 2016
From: Markus Elfring <elfring at users.sourceforge.net>
Date: Wed, 21 Sep 2016 17:21:57 +0200
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Signed-off-by: Markus Elfring <elfring at users.sourceforge.net>
---
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
index f110965..c6a7197 100644
--- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
+++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
@@ -735,7 +735,8 @@ static int omap_dmm_probe(struct platform_device *dev)
/* alloc engines */
omap_dmm->engines = kcalloc(omap_dmm->num_engines,
- sizeof(struct refill_engine), GFP_KERNEL);
+ sizeof(*omap_dmm->engines),
+ GFP_KERNEL);
if (!omap_dmm->engines) {
ret = -ENOMEM;
goto fail;
--
2.10.0
More information about the dri-devel
mailing list