X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fsysclk-lwla%2Fapi.c;h=0a614f9dbc4023f2a0f44780efd0f8cd10565731;hb=efa9840222f2925c187715377e3646679fd8496c;hp=59d126334c99900c8e5f222c28e1cf8a233b62af;hpb=e91bb0a6c4a94957e4e998ca134dc806bec49a7f;p=libsigrok.git diff --git a/src/hardware/sysclk-lwla/api.c b/src/hardware/sysclk-lwla/api.c index 59d12633..0a614f9d 100644 --- a/src/hardware/sysclk-lwla/api.c +++ b/src/hardware/sysclk-lwla/api.c @@ -282,10 +282,6 @@ static int dev_open(struct sr_dev_inst *sdi) devc = sdi->priv; usb = sdi->conn; - if (!drvc) { - sr_err("Driver was not initialized."); - return SR_ERR; - } if (sdi->status != SR_ST_INACTIVE) { sr_err("Device already open."); return SR_ERR; @@ -349,19 +345,13 @@ static int dev_open(struct sr_dev_inst *sdi) */ static int dev_close(struct sr_dev_inst *sdi) { - struct drv_context *drvc; struct dev_context *devc; struct sr_usb_dev_inst *usb; int ret; - drvc = sdi->driver->context; devc = sdi->priv; usb = sdi->conn; - if (!drvc) { - sr_err("Driver was not initialized."); - return SR_ERR; - } if (sdi->status == SR_ST_INACTIVE) { sr_dbg("Device already closed."); return SR_OK;