accel/qaic: Drop redundant vfree() null check in sahara
authorJeffrey Hugo <quic_jhugo@quicinc.com>
Sun, 17 Nov 2024 20:26:29 +0000 (13:26 -0700)
committerJeffrey Hugo <quic_jhugo@quicinc.com>
Fri, 22 Nov 2024 18:35:15 +0000 (11:35 -0700)
The documentation for vfree() says that passing in NULL is ok. Therefore
we can drop the null check as redundant.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410301732.abF5Md4e-lkp@intel.com/
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Youssef Samir <quic_yabdulra@quicinc.com>
Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241117202629.1681358-1-quic_jhugo@quicinc.com
drivers/accel/qaic/sahara.c

index 6d772143d6125656025ddae591c11e3ad873f610..21d58aed0deba63782d370f76c2b3649f0972cbb 100644 (file)
@@ -772,8 +772,7 @@ static void sahara_mhi_remove(struct mhi_device *mhi_dev)
 
        cancel_work_sync(&context->fw_work);
        cancel_work_sync(&context->dump_work);
-       if (context->mem_dump)
-               vfree(context->mem_dump);
+       vfree(context->mem_dump);
        sahara_release_image(context);
        mhi_unprepare_from_transfer(mhi_dev);
 }