chronovu-la8: not a bug if an unused driver gets asked to clean up

This commit is contained in:
Bert Vermeulen 2012-11-07 00:39:46 +01:00
parent ff94568366
commit 33e8a3c525
1 changed files with 3 additions and 4 deletions

View File

@ -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();