From 4efd5462c78f1b44cd30a45a2b1f37053d5b7b60 Mon Sep 17 00:00:00 2001 From: Frank Stettner Date: Sun, 9 May 2021 18:55:08 +0200 Subject: [PATCH] rdtech-dps: Add missing devc initialisation. --- src/hardware/rdtech-dps/protocol.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hardware/rdtech-dps/protocol.c b/src/hardware/rdtech-dps/protocol.c index 7005a7a1..9ce2eb66 100644 --- a/src/hardware/rdtech-dps/protocol.c +++ b/src/hardware/rdtech-dps/protocol.c @@ -586,6 +586,10 @@ SR_PRIV int rdtech_dps_seed_receive(const struct sr_dev_inst *sdi) struct rdtech_dps_state state; int ret; + if (!sdi || !sdi->priv) + return SR_ERR_ARG; + devc = sdi->priv; + ret = rdtech_dps_get_state(sdi, &state, ST_CTX_PRE_ACQ); if (ret != SR_OK) return ret;