From 056b2fa6fe2118d34e76735cfb4ba88c095903da Mon Sep 17 00:00:00 2001 From: balaton Date: Mon, 29 Jan 2018 00:15:56 +0000 Subject: [PATCH] parthenope: Fix bug in cdrom.c:get_dev() Never call start_unit_scan() with NULL argument, the original u-boot on Sam460ex cannot handle this. git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@55043 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- arch/ppc-sam440/boot/parthenope/src/cdrom.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/ppc-sam440/boot/parthenope/src/cdrom.c b/arch/ppc-sam440/boot/parthenope/src/cdrom.c index ec064b180c..abb99afd18 100644 --- a/arch/ppc-sam440/boot/parthenope/src/cdrom.c +++ b/arch/ppc-sam440/boot/parthenope/src/cdrom.c @@ -461,10 +461,12 @@ static block_dev_desc_t *get_dev() block_dev_desc_t *bdev = NULL; SCAN_HANDLE hnd; uint32_t blocksize; + void *scan_list = get_scan_list(); - start_unit_scan(NULL, &blocksize); + if(scan_list == NULL) + return NULL; - for (hnd = start_unit_scan(get_scan_list(), &blocksize); + for (hnd = start_unit_scan(scan_list, &blocksize); hnd != NULL; hnd = next_unit_scan(hnd, &blocksize)) { if (hnd->ush_device.type == DEV_TYPE_CDROM) { bdev = malloc(sizeof(block_dev_desc_t)); -- 2.11.4.GIT