All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: qemu-devel@nongnu.org, peter.maydell@linaro.org
Cc: alistai@xilinx.com, sai.pavan.boddu@xilinx.com,
	edgar.iglesias@xilinx.com
Subject: [Qemu-devel] [PULL v2 1/9] microblaze: boot.c: Don't try to find NULL file
Date: Fri, 26 Jan 2018 11:22:34 +0100	[thread overview]
Message-ID: <1516962162-25680-2-git-send-email-edgar.iglesias@gmail.com> (raw)
In-Reply-To: <1516962162-25680-1-git-send-email-edgar.iglesias@gmail.com>

From: Alistair Francis <alistair.francis@xilinx.com>

Previously if no device tree was passed to microblaze_load_kernel() then
qemu_find_file() would try to find a NULL pointer. To avoid this put a
check around qemu_find_file().

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
---
 hw/microblaze/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c
index 457a08a..35bfeda 100644
--- a/hw/microblaze/boot.c
+++ b/hw/microblaze/boot.c
@@ -124,7 +124,7 @@ void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base,
     kernel_cmdline = qemu_opt_get(machine_opts, "append");
     dtb_arg = qemu_opt_get(machine_opts, "dtb");
     /* default to pcbios dtb as passed by machine_init */
-    if (!dtb_arg) {
+    if (!dtb_arg && dtb_filename) {
         filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, dtb_filename);
     }
 
-- 
2.7.4

  reply	other threads:[~2018-01-26 15:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-26 10:22 [Qemu-devel] [PULL v2 0/9] Xilinx queue Edgar E. Iglesias
2018-01-26 10:22 ` Edgar E. Iglesias [this message]
2018-01-26 10:22 ` [Qemu-devel] [PULL v2 2/9] xlnx-zynqmp-pmu: Initial commit of the ZynqMP PMU Edgar E. Iglesias
2018-01-26 10:22 ` [Qemu-devel] [PULL v2 3/9] xlnx-zynqmp-pmu: Add the CPU and memory Edgar E. Iglesias
2018-01-26 10:22 ` [Qemu-devel] [PULL v2 4/9] aarch64-softmmu.mak: Use an ARM specific config Edgar E. Iglesias
2018-01-26 10:22 ` [Qemu-devel] [PULL v2 5/9] xlnx-pmu-iomod-intc: Add the PMU Interrupt controller Edgar E. Iglesias
2018-01-26 10:22 ` [Qemu-devel] [PULL v2 7/9] xlnx-zynqmp-ipi: Initial version of the Xilinx IPI device Edgar E. Iglesias
2018-01-26 10:22 ` [Qemu-devel] [PULL v2 8/9] xlnx-zynqmp-pmu: Connect the IPI device to the PMU Edgar E. Iglesias
2018-01-26 15:08 ` [Qemu-devel] [PULL v2 0/9] Xilinx queue Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1516962162-25680-2-git-send-email-edgar.iglesias@gmail.com \
    --to=edgar.iglesias@gmail.com \
    --cc=alistai@xilinx.com \
    --cc=edgar.iglesias@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sai.pavan.boddu@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.