From 8b1a24710664df9e5d1252caca2d11ec82b930a0 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 25 May 2013 14:48:23 +1000 Subject: [PATCH] Reset avalon->device_fd after it is closed. --- driver-avalon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/driver-avalon.c b/driver-avalon.c index 23cda76e..ca0ae86c 100644 --- a/driver-avalon.c +++ b/driver-avalon.c @@ -659,16 +659,16 @@ static bool avalon_detect_one(const char *devpath) info->temp_old = 0; info->frequency = frequency; - avalon->device_fd = -1; - ret = avalon_reset(avalon, fd); if (ret) { ; /* FIXME: I think IT IS avalon and wait on reset; * avalon_close(fd); * return false; */ } - avalon_close(fd); + + avalon->device_fd = -1; + return true; }