From: Uwe Hermann Date: Sun, 24 Dec 2017 14:23:40 +0000 (+0100) Subject: sr_dev_close(): Drop unneeded variable. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=56c8dd821e7d8ab3602e5fd001f56d91d7b42df3;p=libsigrok.git sr_dev_close(): Drop unneeded variable. --- diff --git a/src/device.c b/src/device.c index ae8f3b8c..6fcad410 100644 --- a/src/device.c +++ b/src/device.c @@ -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); } /**