That literally is a type of morality, utilitarianism. Kantian deontology is not the only form of morality structure there is.