From: Bert Vermeulen Date: Tue, 6 Nov 2012 23:39:46 +0000 (+0100) Subject: chronovu-la8: not a bug if an unused driver gets asked to clean up X-Git-Tag: dsupstream~581 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=33e8a3c5258d9ac92841cf47abd1e1f7528d640b;p=libsigrok.git chronovu-la8: not a bug if an unused driver gets asked to clean up --- 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();