qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
	qemu-trivial@nongnu.org, Eric Blake <eblake@redhat.com>,
	Peter Crosthwaite <crosthwaite.peter@gmail.com>,
	Markus Armbruster <armbru@redhat.com>,
	Laszlo Ersek <lersek@redhat.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>, Alexander Graf <agraf@suse.de>,
	David Gibson <david@gibson.dropbear.id.au>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Alistair Francis <alistair.francis@xilinx.com>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [Qemu-devel] [PATCH 2/3] hw/core: fix missing return value in load_image_targphys_as()
Date: Fri, 23 Jun 2017 13:45:56 -0300	[thread overview]
Message-ID: <20170623164557.11636-3-f4bug@amsat.org> (raw)
In-Reply-To: <20170623164557.11636-1-f4bug@amsat.org>

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/core/loader.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/core/loader.c b/hw/core/loader.c
index 094f24627f..e137e772ae 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -150,7 +150,9 @@ int load_image_targphys_as(const char *filename,
         return -1;
     }
     if (size > 0) {
-        rom_add_file_fixed_as(filename, addr, -1, as);
+        if (rom_add_file_fixed_as(filename, addr, -1, as) < 0) {
+            return -1;
+        }
     }
     return size;
 }
-- 
2.13.1

  parent reply	other threads:[~2017-06-23 16:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-23 16:45 [Qemu-devel] [PATCH 0/3] hw/core: minor fixups Philippe Mathieu-Daudé
2017-06-23 16:45 ` [Qemu-devel] [PATCH 1/3] elf-loader: warn about invalid endianess Philippe Mathieu-Daudé
2017-06-23 17:11   ` Peter Maydell
2017-06-27 13:29   ` Michael Tokarev
2017-06-23 16:45 ` Philippe Mathieu-Daudé [this message]
2017-06-26 22:36   ` [Qemu-devel] [PATCH 2/3] hw/core: fix missing return value in load_image_targphys_as() Alistair Francis
2017-06-27 13:30   ` Michael Tokarev
2017-06-23 16:45 ` [Qemu-devel] [PATCH 3/3] hw/core: report an error if invalid gpio is used Philippe Mathieu-Daudé
2017-06-23 19:25   ` Eduardo Habkost
2017-06-27  1:33     ` Eric Blake
2017-06-23 19:47   ` Eduardo Habkost
2017-06-26 22:39   ` Alistair Francis
2017-06-23 19:45 ` [Qemu-devel] [PATCH 0/3] hw/core: minor fixups Eduardo Habkost
2017-06-27 12:16   ` Philippe Mathieu-Daudé
2017-06-23 20:09 ` Laszlo Ersek
2017-06-26 22:33 ` Alistair Francis

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=20170623164557.11636-3-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=agraf@suse.de \
    --cc=alistair.francis@xilinx.com \
    --cc=armbru@redhat.com \
    --cc=crosthwaite.peter@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=eblake@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).