u-boot/drivers/sysreset
Michal Suchanek c726fc01cf dm: treewide: Use uclass_first_device_err when accessing one device
There is a number of users that use uclass_first_device to access the
first and (assumed) only device in uclass.

Some check the return value of uclass_first_device and also that a
device was returned which is exactly what uclass_first_device_err does.

Some are not checking that a device was returned and can potentially
crash if no device exists in the uclass. Finally there is one that
returns NULL on error either way.

Convert all of these to use uclass_first_device_err instead, the return
value will be removed from uclass_first_device in a later patch.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-17 21:17:12 -06:00
..
Kconfig RISC-V: enable CONFIG_SYSRESET_SBI by default 2022-09-06 13:00:58 +08:00
Makefile sysreset: Add Atmel/Microchip sysreset driver 2022-04-26 09:51:46 +03:00
poweroff_gpio.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
sysreset-ti-sci.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
sysreset-uclass.c sysreset: provide type of reset in do_reset cmd 2021-04-20 07:31:12 -04:00
sysreset_ast.c dm: treewide: Use uclass_first_device_err when accessing one device 2022-10-17 21:17:12 -06:00
sysreset_at91.c sysreset: Add Atmel/Microchip sysreset driver 2022-04-26 09:51:46 +03:00
sysreset_gpio.c sysreset: Mark driver probe functions as static 2021-11-04 08:57:19 +01:00
sysreset_microblaze.c microblaze: branch to base vector address on reset 2022-01-05 10:22:03 +01:00
sysreset_mpc83xx.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
sysreset_mpc83xx.h mpc83xx: Add sysreset driver 2018-09-18 00:01:18 -06:00
sysreset_octeon.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
sysreset_psci.c sysreset: psci: use psci driver exported functions 2021-04-20 07:31:12 -04:00
sysreset_resetctl.c sysreset: Mark driver probe functions as static 2021-11-04 08:57:19 +01:00
sysreset_rockchip.c rockchip: use 'arch-rockchip' as header file path 2019-05-01 00:00:05 +02:00
sysreset_sandbox.c treewide: Use OF_REAL instead of !OF_PLATDATA 2021-09-25 09:46:15 -06:00
sysreset_sbi.c sysreset: provide SBI based sysreset driver 2021-10-07 16:08:23 +08:00
sysreset_socfpga.c sysreset: socfpga: Use parent device for reading base address 2022-07-01 14:57:14 +08:00
sysreset_socfpga_soc64.c sysreset: socfpga: soc64: Rename SYSRESET SoCFPGA driver for S10 to SoC64 2020-10-09 17:53:11 +08:00
sysreset_sti.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
sysreset_syscon.c sysreset: Mark driver probe functions as static 2021-11-04 08:57:19 +01:00
sysreset_watchdog.c sysreset: watchdog: watchdog cannot power off 2021-12-26 06:49:14 +01:00
sysreset_x86.c x86: sysreset: Move priv/plat structs to headers 2021-01-05 12:24:41 -07:00
sysreset_xtfpga.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00