dm: core: remove redundant if statement