diff mbox

drm/i915: fix noderef.cocci warnings

Message ID 20170514130431.GA43125@lkp-nex05.lkp.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fengguang Wu May 14, 2017, 1:04 p.m. UTC
drivers/gpu/drm/i915/i915_syncmap.c:285:45-51: ERROR: application of sizeof to pointer

 sizeof when applied to a pointer typed expression gives the size of
 the pointer

Generated by: scripts/coccinelle/misc/noderef.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 i915_syncmap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

--- a/drivers/gpu/drm/i915/i915_syncmap.c
+++ b/drivers/gpu/drm/i915/i915_syncmap.c
@@ -282,7 +282,7 @@  static noinline int __sync_set(struct i9
 			unsigned int above;
 
 			/* Insert a join above the current layer */
-			next = kzalloc(sizeof(*next) + KSYNCMAP * sizeof(next),
+			next = kzalloc(sizeof(*next) + KSYNCMAP * sizeof(*next),
 				       GFP_KERNEL);
 			if (unlikely(!next))
 				return -ENOMEM;