From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> Date: Mon, 2 Feb 2015 15:30:37 +0100 The dm_table_destroy() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> --- drivers/md/dm-ioctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 73f791b..4fac6cf 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -1053,8 +1053,7 @@ static int do_resume(struct dm_ioctl *param) * Since dm_swap_table synchronizes RCU, nobody should be in * read-side critical section already. */ - if (old_map) - dm_table_destroy(old_map); + dm_table_destroy(old_map); if (!r) __dev_status(md, param); -- 2.2.2 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel