bpf, devmap: Remove unnecessary if check in for loop
authorThorsten Blum <thorsten.blum@toblux.com>
Wed, 29 May 2024 10:19:01 +0000 (12:19 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 3 Jun 2024 15:09:23 +0000 (17:09 +0200)
commit2317dc2c22cc353b699c7d1db47b2fe91f54055c
tree3928bdbf9088d489be803b1b6c60d6a7b743922f
parent7d0b3953f6d832daec10a0d76e2d4db405768a8b
bpf, devmap: Remove unnecessary if check in for loop

The iterator variable dst cannot be NULL and the if check can be removed.
Remove it and fix the following Coccinelle/coccicheck warning reported
by itnull.cocci:

ERROR: iterator variable bound on line 762 cannot be NULL

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/bpf/20240529101900.103913-2-thorsten.blum@toblux.com
kernel/bpf/devmap.c