aboutsummaryrefslogtreecommitdiff
path: root/hw/block/onenand.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-06-06 18:25:12 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2014-06-16 17:23:19 +0800
commitf7047c2daf760385edf83df10be4259bea190e75 (patch)
treea84a3315f0b8d6f393037032da42b78beccb47b3 /hw/block/onenand.c
parentb25c9dff3599892a16f824b5df643e0fc1acbfc1 (diff)
block: Drop superfluous conditionals around g_free()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/block/onenand.c')
-rw-r--r--hw/block/onenand.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/block/onenand.c b/hw/block/onenand.c
index 60d5311d04..5388122eb8 100644
--- a/hw/block/onenand.c
+++ b/hw/block/onenand.c
@@ -335,9 +335,7 @@ static inline int onenand_prog_spare(OneNANDState *s, int sec, int secn,
dp, 1) < 0;
}
}
- if (dp) {
- g_free(dp);
- }
+ g_free(dp);
}
return result;
}