Skip to contentSkip to conversation

drm: omapdrm: Delete useless kfree code

PATCH In review Zheng Yongjun 2 participants 2 messages Dec 14, 2020 – Dec 15, 2020

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

PATCH 1/1 drm: omapdrm: Delete useless kfree code

The parameter of kfree function is NULL, so kfree code is useless, delete it.

---
 drivers/gpu/drm/omapdrm/tcm-sita.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/omapdrm/tcm-sita.c +0 -1
index 817be3c41863..af59e9c03917 100644
@@ -254,6 +254,5 @@ struct tcm *sita_init(u16 width, u16 height)
 	return tcm;
 
 error:
-	kfree(tcm);
 	return NULL;
 }
Signature · 1 line
2.22.0
#1 lore raw
Quoted 12 lines · Zheng Yongjun

The parameter of kfree function is NULL, so kfree code is useless, delete it.

---
  drivers/gpu/drm/omapdrm/tcm-sita.c | 1 -
  1 file changed, 1 deletion(-)
drivers/gpu/drm/omapdrm/tcm-sita.c +0 -0
index 817be3c41863..af59e9c03917 100644

drivers/gpu/drm/omapdrm/tcm-sita.c struct tcm *sita_init(u16 width, u16 height) · line 258

Quoted 6 lines
drivers/gpu/drm/omapdrm/tcm-sita.c +0 -1
@@ -254,6 +254,5 @@ struct tcm *sita_init(u16 width, u16 height)
  	return tcm;
 
  error:
-	kfree(tcm);
  	return NULL;
  }

Thanks, I'll merge this.

Tomi

Signature · 6 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel