summary refs log tree commit diff stats
path: root/hw/sd/pl181.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/sd/pl181.c')
-rw-r--r--hw/sd/pl181.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c
index b8fc9f86f1..5d56ead4d9 100644
--- a/hw/sd/pl181.c
+++ b/hw/sd/pl181.c
@@ -173,14 +173,12 @@ static void pl181_do_command(PL181State *s)
 {
     SDRequest request;
     uint8_t response[16];
-    int rlen;
+    size_t rlen;
 
     request.cmd = s->cmd & PL181_CMD_INDEX;
     request.arg = s->cmdarg;
     trace_pl181_command_send(request.cmd, request.arg);
-    rlen = sdbus_do_command(&s->sdbus, &request, response);
-    if (rlen < 0)
-        goto error;
+    rlen = sdbus_do_command(&s->sdbus, &request, response, sizeof(response));
     if (s->cmd & PL181_CMD_RESPONSE) {
         if (rlen == 0 || (rlen == 4 && (s->cmd & PL181_CMD_LONGRESP)))
             goto error;