]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/managed: Simplify if condition
authorThorsten Blum <thorsten.blum@toblux.com>
Mon, 1 Jul 2024 19:56:08 +0000 (21:56 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 3 Jul 2024 08:11:03 +0000 (10:11 +0200)
commit3f5ea7ed705e8effe9cfabf912e769ccb6b7d389
treec3036010025cff2d0a64502ba6bfd4f24f6e9b6d
parentb84c28f33d35361282d27ac304c888dc1ad38a15
drm/managed: Simplify if condition

The if condition !A || A && B can be simplified to !A || B.

Fixes the following Coccinelle/coccicheck warning reported by
excluded_middle.cocci:

WARNING !A || A && B is equivalent to !A || B

Compile-tested only.

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20240701195607.228852-1-thorsten.blum@toblux.com
drivers/gpu/drm/drm_managed.c