summaryrefslogtreecommitdiffstats
path: root/lib/x1000-installer/src/xf_nandio.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/x1000-installer/src/xf_nandio.c')
-rw-r--r--lib/x1000-installer/src/xf_nandio.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/x1000-installer/src/xf_nandio.c b/lib/x1000-installer/src/xf_nandio.c
index 29ff9d9120..6dc87bc420 100644
--- a/lib/x1000-installer/src/xf_nandio.c
+++ b/lib/x1000-installer/src/xf_nandio.c
@@ -75,10 +75,7 @@ int xf_nandio_init(struct xf_nandio* nio)
void xf_nandio_destroy(struct xf_nandio* nio)
{
- if(nio->alloc_handle > 0) {
- core_free(nio->alloc_handle);
- nio->alloc_handle = 0;
- }
+ nio->alloc_handle = core_free(nio->alloc_handle);
if(nio->ndrv) {
nand_lock(nio->ndrv);