aboutsummaryrefslogtreecommitdiff
path: root/hw/gpio/max7310.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-09-22 15:42:23 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-09-22 15:42:23 +0100
commit834b9273d5cdab68180dc8c84d641aaa4344b057 (patch)
treec6be3eb86a2fa267d85f16122592b6e3c868fd98 /hw/gpio/max7310.c
parent4dad0a9aa818698e0735c8352bf7925a1660df6f (diff)
parent639b090df52a4952262615328a3fdfae81234ea8 (diff)
downloadqemu-834b9273d5cdab68180dc8c84d641aaa4344b057.zip
qemu-834b9273d5cdab68180dc8c84d641aaa4344b057.tar.gz
qemu-834b9273d5cdab68180dc8c84d641aaa4344b057.tar.bz2
Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-for-5.2-pull-request' into staging
Pull request trivial patches 20200919 # gpg: Signature made Sat 19 Sep 2020 19:43:35 BST # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full] # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/trivial-branch-for-5.2-pull-request: contrib/: fix some comment spelling errors qapi/: fix some comment spelling errors disas/: fix some comment spelling errors linux-user/: fix some comment spelling errors util/: fix some comment spelling errors scripts/: fix some comment spelling errors docs/: fix some comment spelling errors migration/: fix some comment spelling errors qemu/: fix some comment spelling errors scripts/git.orderfile: Display meson files along with buildsys ones hw/timer/hpet: Fix debug format strings hw/timer/hpet: Remove unused functions hpet_ram_readb, hpet_ram_readw meson: remove empty else and duplicated gio deps manual: escape backslashes in "parsed-literal" blocks ui/spice-input: Remove superfluous forward declaration hw/ppc/ppc4xx_pci: Replace magic value by the PCI_NUM_PINS definition hw/gpio/max7310: Remove impossible check Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/gpio/max7310.c')
-rw-r--r--hw/gpio/max7310.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/gpio/max7310.c b/hw/gpio/max7310.c
index 256d833..db6b5e3 100644
--- a/hw/gpio/max7310.c
+++ b/hw/gpio/max7310.c
@@ -8,9 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "hw/hw.h"
#include "hw/i2c/i2c.h"
-#include "hw/hw.h"
#include "hw/irq.h"
#include "migration/vmstate.h"
#include "qemu/log.h"
@@ -173,8 +171,7 @@ static const VMStateDescription vmstate_max7310 = {
static void max7310_gpio_set(void *opaque, int line, int level)
{
MAX7310State *s = (MAX7310State *) opaque;
- if (line >= ARRAY_SIZE(s->handler) || line < 0)
- hw_error("bad GPIO line");
+ assert(line >= 0 && line < ARRAY_SIZE(s->handler));
if (level)
s->level |= s->direction & (1 << line);