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 <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/20200312134507.10000-1-wsa@the-dreams.de
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Wolfram Sang 2020-03-12 14:45:07 +01:00 committed by Mark Brown
parent 1a421ebab6
commit 5b16668e63
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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,