]> sigrok.org Git - libsigrok.git/commitdiff
hantek-dso: Simplify cleanup().
authorUwe Hermann <redacted>
Fri, 31 May 2013 13:18:47 +0000 (15:18 +0200)
committerUwe Hermann <redacted>
Sun, 2 Jun 2013 11:52:40 +0000 (13:52 +0200)
hardware/hantek-dso/api.c

index 822b8b9af8c22fd8a6dfe1600b3fd2c9ecb4b120..dee781eb68a74d5929a10269090ff98bd464e0aa 100644 (file)
@@ -419,14 +419,7 @@ static int dev_close(struct sr_dev_inst *sdi)
 
 static int cleanup(void)
 {
-       struct drv_context *drvc;
-
-       if (!(drvc = di->priv))
-               return SR_OK;
-
-       clear_instances();
-
-       return SR_OK;
+       return clear_instances();
 }
 
 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)