if (!driver || !data)
return SR_ERR;
+ if (!driver->config_get)
+ return SR_ERR_ARG;
+
if ((ret = driver->config_get(key, data, sdi)) == SR_OK) {
/* Got a floating reference from the driver. Sink it here,
* caller will need to unref when done with it. */
{
int ret;
- if (!driver || !data || !driver->config_list)
+ if (!driver || !data)
ret = SR_ERR;
+ else if (!sdi->driver->config_list)
+ ret = SR_ERR_ARG;
else if ((ret = driver->config_list(key, data, sdi)) == SR_OK)
g_variant_ref_sink(*data);