u-boot/drivers/w1
Martin Fuzzey 65b60897a7 w1: fix data abort if no one wire bus master present
When the "w1 bus" command is used with no bus master present
a data abort may occur.

This is because uclass_first_device() returns zero, but sets the output
struct udevice pointer to NULL in the no device found case.

Fix w1_get_bus() to account for this and return an error code
as is expected by the callers.

Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group>
Reviewed-by: Eugen Hristev <eugen.hristev@microchip.com>
2018-11-01 10:02:10 -04:00
..
Kconfig w1: Add 1-Wire gpio driver 2018-09-28 20:22:34 -04:00
Makefile w1: Add 1-Wire gpio driver 2018-09-28 20:22:34 -04:00
w1-gpio.c w1: Add 1-Wire gpio driver 2018-09-28 20:22:34 -04:00
w1-uclass.c w1: fix data abort if no one wire bus master present 2018-11-01 10:02:10 -04:00