size_t read;
};
-static struct {
+static const struct {
uint16_t vendor_id;
uint16_t product_id;
const char *serialcomm;
(void)drvc;
(void)params;
- if (!(sscpi->serial = sr_serial_dev_inst_new(resource, serialcomm)))
- return SR_ERR;
+ sscpi->serial = sr_serial_dev_inst_new(resource, serialcomm);
return SR_OK;
}