summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2020-03-12 14:45:07 +0100
committerMark Brown <broonie@kernel.org>2020-03-12 17:38:41 +0000
commit5b16668e638c61a9cd4dffaa41d8b3b6f53f6b3a (patch)
tree490dc7862c606b95a4a999276e80d8cf2336fb9d
parent1a421ebab6bb5bf65001743ba9fef48e94fb345a (diff)
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>
-rw-r--r--drivers/spi/spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index f6f6b2a0c81c..0996d238f61e 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,