From: Jeffrey Hugo Date: Sun, 17 Nov 2024 20:26:29 +0000 (-0700) Subject: accel/qaic: Drop redundant vfree() null check in sahara X-Git-Tag: v6.14-rc1~174^2~18^2~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57250e0fa30194d4ac309ee87573bed71db68b46;p=thirdparty%2Fkernel%2Flinux.git accel/qaic: Drop redundant vfree() null check in sahara 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 Closes: https://lore.kernel.org/oe-kbuild-all/202410301732.abF5Md4e-lkp@intel.com/ Signed-off-by: Jeffrey Hugo Reviewed-by: Dmitry Baryshkov Reviewed-by: Youssef Samir Reviewed-by: Carl Vanderlip Link: https://patchwork.freedesktop.org/patch/msgid/20241117202629.1681358-1-quic_jhugo@quicinc.com --- diff --git a/drivers/accel/qaic/sahara.c b/drivers/accel/qaic/sahara.c index 6d772143d6125..21d58aed0deba 100644 --- a/drivers/accel/qaic/sahara.c +++ b/drivers/accel/qaic/sahara.c @@ -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); }