aboutsummaryrefslogtreecommitdiff
path: root/hw/gpio/max7310.c
diff options
context:
space:
mode:
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 256d833c3a..db6b5e3d76 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);