From: Uwe Hermann Date: Fri, 31 May 2013 13:18:47 +0000 (+0200) Subject: hantek-dso: Simplify cleanup(). X-Git-Tag: libsigrok-0.2.1~80 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=dec6c583a2d8097ef3214b5d37432ef8edfbfb3a;p=libsigrok.git hantek-dso: Simplify cleanup(). --- diff --git a/hardware/hantek-dso/api.c b/hardware/hantek-dso/api.c index 822b8b9a..dee781eb 100644 --- a/hardware/hantek-dso/api.c +++ b/hardware/hantek-dso/api.c @@ -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)