]> sigrok.org Git - libsigrok.git/commitdiff
sr_dev_close(): Drop unneeded variable.
authorUwe Hermann <redacted>
Sun, 24 Dec 2017 14:23:40 +0000 (15:23 +0100)
committerUwe Hermann <redacted>
Sun, 24 Dec 2017 14:23:40 +0000 (15:23 +0100)
src/device.c

index ae8f3b8ce5a540f6697c89ba2454dd11d2a8cb56..6fcad410f2bc3802f979f7bb2f9687b755861940 100644 (file)
@@ -610,8 +610,6 @@ SR_API int sr_dev_open(struct sr_dev_inst *sdi)
  */
 SR_API int sr_dev_close(struct sr_dev_inst *sdi)
 {
-       int ret;
-
        if (!sdi || !sdi->driver || !sdi->driver->dev_close)
                return SR_ERR_ARG;
 
@@ -625,9 +623,7 @@ SR_API int sr_dev_close(struct sr_dev_inst *sdi)
 
        sr_dbg("%s: Closing device instance.", sdi->driver->name);
 
-       ret = sdi->driver->dev_close(sdi);
-
-       return ret;
+       return sdi->driver->dev_close(sdi);
 }
 
 /**