From 2856670f23a92ab72db850d73f30c0b4b6ba5a76 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 26 Jul 2017 16:14:00 +0300 Subject: spi: core: Propagate error code of add_uevent_var() add_uevent_var() can fail, let caller know about this. Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown --- drivers/spi/spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/spi/spi.c') diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 4fcbb0aa71d3..fe7bba9241ea 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -321,8 +321,7 @@ static int spi_uevent(struct device *dev, struct kobj_uevent_env *env) if (rc != -ENODEV) return rc; - add_uevent_var(env, "MODALIAS=%s%s", SPI_MODULE_PREFIX, spi->modalias); - return 0; + return add_uevent_var(env, "MODALIAS=%s%s", SPI_MODULE_PREFIX, spi->modalias); } struct bus_type spi_bus_type = { -- cgit v1.2.1