Skip to contentSkip to conversation

drm/tegra: Remove redundant NULL check before kfree

PATCH New [email protected] 1 participant 1 message Jun 2, 2022

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

PATCH 1/1 drm/tegra: Remove redundant NULL check before kfree

From: Minghao Chi <[email protected]>

kfree on NULL pointer is a no-op.

---
 drivers/gpu/drm/tegra/submit.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/tegra/submit.c +1 -2
index 6d6dd8c35475..54ac31bc80f6 100644
@@ -639,8 +639,7 @@ int tegra_drm_ioctl_channel_submit(struct drm_device *drm, void *data,
 		kfree(job_data->used_mappings);
 	}
 
-	if (job_data)
-		kfree(job_data);
+	kfree(job_data);
 put_bo:
 	gather_bo_put(&bo->base);
 unlock:
Signature · 1 line
2.25.1