diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-07-26 16:14:00 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-07-26 15:30:35 +0100 |
commit | 2856670f23a92ab72db850d73f30c0b4b6ba5a76 (patch) | |
tree | a8b6e8c3c629021fac0df210f0c9305ac1bb3a72 /drivers/spi/spi.c | |
parent | 5771a8c08880cdca3bfb4a3fc6d309d6bba20877 (diff) | |
download | blackbird-op-linux-2856670f23a92ab72db850d73f30c0b4b6ba5a76.tar.gz blackbird-op-linux-2856670f23a92ab72db850d73f30c0b4b6ba5a76.zip |
spi: core: Propagate error code of add_uevent_var()
add_uevent_var() can fail, let caller know about this.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 3 |
1 files changed, 1 insertions, 2 deletions
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 = { |