forked from luck/tmp_suning_uos_patched
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:
parent
1a421ebab6
commit
5b16668e63
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user