Skip to content

Commit

Permalink
spi: core: Propagate error code of add_uevent_var()
Browse files Browse the repository at this point in the history
add_uevent_var() can fail, let caller know about this.

Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
andy-shev authored and broonie committed Jul 26, 2017
1 parent 5771a8c commit 2856670
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 2856670

Please sign in to comment.