diff mbox series

drm/msm/dpu: remove NULL-ness check in dpu_hw_intr_destroy

Message ID 20220507114009.1696278-1-dmitry.baryshkov@linaro.org
State Accepted
Commit dfba7f5b24d1877f57f3ca296f8a654a23637149
Headers show
Series drm/msm/dpu: remove NULL-ness check in dpu_hw_intr_destroy | expand

Commit Message

Dmitry Baryshkov May 7, 2022, 11:40 a.m. UTC
There is no need to check that kfree() argument is not NULL. Remove
extra check and call kfree() unconditionally.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Stephen Boyd May 12, 2022, 12:52 a.m. UTC | #1
Quoting Dmitry Baryshkov (2022-05-07 04:40:09)
> There is no need to check that kfree() argument is not NULL. Remove
> extra check and call kfree() unconditionally.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
index fa4f99034a08..915250b7f122 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
@@ -433,8 +433,7 @@  struct dpu_hw_intr *dpu_hw_intr_init(void __iomem *addr,
 
 void dpu_hw_intr_destroy(struct dpu_hw_intr *intr)
 {
-	if (intr)
-		kfree(intr);
+	kfree(intr);
 }
 
 int dpu_core_irq_register_callback(struct dpu_kms *dpu_kms, int irq_idx,