From: Dan Carpenter Date: Wed, 8 Jan 2025 09:13:20 +0000 (+0300) Subject: dmaengine: idxd: Delete unnecessary NULL check X-Git-Tag: v6.15-rc1~75^2~18 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=2c17e9ea0caa5555e31e154fa1b06260b816f5cc;p=linux-block.git dmaengine: idxd: Delete unnecessary NULL check The "saved_evl" pointer is a offset into the middle of a non-NULL struct. It can't be NULL and the check is slightly confusing. Delete the check. Signed-off-by: Dan Carpenter Reviewed-by: Fenghua Yu Link: https://lore.kernel.org/r/ec38214e-0bbb-4c5a-94ff-b2b2d4c3f245@stanley.mountain Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c index b946f78f85e1..fca1d2924999 100644 --- a/drivers/dma/idxd/init.c +++ b/drivers/dma/idxd/init.c @@ -912,8 +912,7 @@ static void idxd_device_config_restore(struct idxd_device *idxd, idxd->rdbuf_limit = idxd_saved->saved_idxd.rdbuf_limit; - if (saved_evl) - idxd->evl->size = saved_evl->size; + idxd->evl->size = saved_evl->size; for (i = 0; i < idxd->max_groups; i++) { struct idxd_group *saved_group, *group;