From 33e8a3c5258d9ac92841cf47abd1e1f7528d640b Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Wed, 7 Nov 2012 00:39:46 +0100 Subject: [PATCH] chronovu-la8: not a bug if an unused driver gets asked to clean up --- hardware/chronovu-la8/api.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hardware/chronovu-la8/api.c b/hardware/chronovu-la8/api.c index 75f085c6..5fab2f1a 100644 --- a/hardware/chronovu-la8/api.c +++ b/hardware/chronovu-la8/api.c @@ -278,10 +278,9 @@ static int hw_dev_close(struct sr_dev_inst *sdi) static int hw_cleanup(void) { - if (!di->priv) { - sr_err("%s: di->priv was NULL.", __func__); - return SR_ERR_BUG; - } + if (!di->priv) + /* Can get called on an unused driver, doesn't matter. */ + return SR_OK; clear_instances();