From: Wolfram Sang Date: Thu, 12 Mar 2020 13:45:07 +0000 (+0100) Subject: spi: acpi: remove superfluous parameter check X-Git-Tag: v5.10.7~2120^2~42^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b16668e638c61a9cd4dffaa41d8b3b6f53f6b3a;p=platform%2Fkernel%2Flinux-rpi.git spi: acpi: remove superfluous parameter check to_spi_device() already checks 'dev'. No need to do it before calling it. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20200312134507.10000-1-wsa@the-dreams.de Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index f6f6b2a..0996d23 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -4028,7 +4028,7 @@ static struct spi_device *acpi_spi_find_device_by_adev(struct acpi_device *adev) struct device *dev; dev = bus_find_device_by_acpi_dev(&spi_bus_type, adev); - return dev ? to_spi_device(dev) : NULL; + return to_spi_device(dev); } static int acpi_spi_notify(struct notifier_block *nb, unsigned long value,