diff options
author | 2025-04-03 14:26:41 +0100 | |
---|---|---|
committer | 2025-05-05 09:47:27 +0200 | |
commit | 330995bb78375bb6309cf007585f429e9d6bc731 (patch) | |
tree | 9a50fb2fd8b7cfb10cae7ae7d6d9668d4918ec32 /drivers/staging | |
parent | media: atomisp: Fix indentation to use TAB instead of spaces (diff) | |
download | wireguard-linux-330995bb78375bb6309cf007585f429e9d6bc731.tar.xz wireguard-linux-330995bb78375bb6309cf007585f429e9d6bc731.zip |
media: atomisp: gmin: Remove duplicate NULL test
When a value has been tested for NULL in an expression, a
second NULL test on the same value in another expression
is unnecessary when the value has not been assigned NULL.
Remove unnecessary duplicate NULL tests on the same value that
has previously been NULL tested.
Found by Coccinelle.
Signed-off-by: Abraham Samuel Adekunle <abrahamadekunle50@gmail.com>
Link: https://lore.kernel.org/r/26990d4a9d4419f9d4155a40595bc213acb671a0.1743685415.git.abrahamadekunle50@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c index e7923dc38f2e..b4f2c785e6a6 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c +++ b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c @@ -1206,7 +1206,7 @@ static int gmin_get_config_dsm_var(struct device *dev, * if it founds something different than string, letting it * to fall back to the old code. */ - if (cur && cur->type != ACPI_TYPE_STRING) { + if (cur->type != ACPI_TYPE_STRING) { dev_info(dev, "found non-string _DSM entry for '%s'\n", var); ACPI_FREE(obj); return -EINVAL; |