Skip to content

Commit 2856670

Browse files
andy-shevbroonie
authored andcommitted
spi: core: Propagate error code of add_uevent_var()
add_uevent_var() can fail, let caller know about this. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 5771a8c commit 2856670

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/spi/spi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,7 @@ static int spi_uevent(struct device *dev, struct kobj_uevent_env *env)
321321
if (rc != -ENODEV)
322322
return rc;
323323

324-
add_uevent_var(env, "MODALIAS=%s%s", SPI_MODULE_PREFIX, spi->modalias);
325-
return 0;
324+
return add_uevent_var(env, "MODALIAS=%s%s", SPI_MODULE_PREFIX, spi->modalias);
326325
}
327326

328327
struct bus_type spi_bus_type = {

0 commit comments

Comments
 (0)