]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: sony-laptop: Remove useless comparisons in sony_pic_read_possible_resou...
authorAndrey Strachuk <strochuk@ispras.ru>
Tue, 19 Jul 2022 11:03:41 +0000 (14:03 +0300)
committerHans de Goede <hdegoede@redhat.com>
Thu, 28 Jul 2022 17:41:29 +0000 (19:41 +0200)
commitc325ab3b0c97096e96fb44a72c3772f7f69dcfec
treee15679adba37057053d1a86ae4e51492d651950a
parentb0eb9fc362aa7412df41e988403938ce5d498bad
platform/x86: sony-laptop: Remove useless comparisons in sony_pic_read_possible_resource()

Local variable 'p' is initialized by an address
of field of acpi_resource structure, so it does
not make sense to compare 'p' with NULL.

Local variable 'io' is initialized by an address
of field of acpi_resource structure, so it does
not make sense to compare 'io' with NULL.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Andrey Strachuk <strochuk@ispras.ru>
Link: https://lore.kernel.org/r/20220719110341.7239-1-strochuk@ispras.ru
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/sony-laptop.c