]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
devlink: remove some unnecessary code
authorDan Carpenter <error27@gmail.com>
Fri, 13 Jan 2023 07:35:43 +0000 (10:35 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 17 Jan 2023 09:02:49 +0000 (10:02 +0100)
commit501543b4fff0ff70bde28a829eb8835081ccef2f
tree52cc63cd4387fd2231cdf0b5392c55a3c1d7eea8
parent0349b8779cc949ad9e6aced32672ee48cf79b497
devlink: remove some unnecessary code

This code checks if (attrs[DEVLINK_ATTR_TRAP_POLICER_ID]) twice.  Once
at the start of the function and then a couple lines later.  Delete the
second check since that one must be true.

Because the second condition is always true, it means the:

policer_item = group_item->policer_item;

assignment is immediately over-written.  Delete that as well.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/Y8EJz8oxpMhfiPUb@kili
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/devlink/leftover.c