cmd: Add test and fix bugs for dm drivers
Add a test for the dm drivers command. Also fix a null pointer dereference revealed by said test. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
4
cmd/dm.c
4
cmd/dm.c
@@ -41,7 +41,7 @@ static int do_dm_dump_devres(cmd_tbl_t *cmdtp, int flag, int argc,
|
||||
}
|
||||
|
||||
static int do_dm_dump_drivers(cmd_tbl_t *cmdtp, int flag, int argc,
|
||||
char * const argv[])
|
||||
char * const argv[])
|
||||
{
|
||||
dm_dump_drivers();
|
||||
|
||||
@@ -94,5 +94,5 @@ U_BOOT_CMD(
|
||||
"tree Dump driver model tree ('*' = activated)\n"
|
||||
"dm uclass Dump list of instances for each uclass\n"
|
||||
"dm devres Dump list of device resources for each device\n"
|
||||
"dm drivers Dump list of drivers and their compatible strings\n"
|
||||
"dm drivers Dump list of drivers and their compatible strings"
|
||||
);
|
||||
|
Reference in New Issue
Block a user