Skip to contentSkip to conversation

drm/komeda: Fix error: not allocating enough data 1592 vs 1584

PATCH In review james qian wang (Arm Technology China) 2 participants 2 messages Aug 19, 2019 – Aug 22, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/komeda: Fix error: not allocating enough data 1592 vs 1584

The patch 5d51f6c0da1b: "drm/komeda: Add writeback support" from May 23, 2019, leads to the following static checker warning:

drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c:151 komeda_wb_connector_add()
error: not allocating enough data 1592 vs 1584

This is a typo which misuse "wb_conn" but which should be "kwb_conn" to allocate the memory.

---
 drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c +1 -1
index 617e1f7b8472..2851cac94d86 100644
@@ -148,7 +148,7 @@ static int komeda_wb_connector_add(struct komeda_kms_dev *kms,
 	if (!kcrtc->master->wb_layer)
 		return 0;
 
-	kwb_conn = kzalloc(sizeof(*wb_conn), GFP_KERNEL);
+	kwb_conn = kzalloc(sizeof(*kwb_conn), GFP_KERNEL);
 	if (!kwb_conn)
 		return -ENOMEM;
 
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 20 lines · james qian wang (Arm Technology China)

The patch 5d51f6c0da1b: "drm/komeda: Add writeback support" from May 23, 2019, leads to the following static checker warning:

drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c:151 komeda_wb_connector_add()
error: not allocating enough data 1592 vs 1584

This is a typo which misuse "wb_conn" but which should be "kwb_conn" to allocate the memory.

---
 drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c +0 -0
index 617e1f7b8472..2851cac94d86 100644

drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c static int komeda_wb_connector_add(struct komeda_kms_dev *kms,

Quoted 9 lines
drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c +1 -2
@@ -148,7 +148,7 @@ static int komeda_wb_connector_add(struct komeda_kms_dev *kms,
 	if (!kcrtc->master->wb_layer)
 		return 0;
 
-	kwb_conn = kzalloc(sizeof(*wb_conn), GFP_KERNEL);
+	kwb_conn = kzalloc(sizeof(*kwb_conn), GFP_KERNEL);
 	if (!kwb_conn)
 		return -ENOMEM;
 
--
Quoted 1 line

2.20.1