+ if (!o) {
+ sr_warn("gnuplot out: %s: o was NULL", __func__);
+ return SR_ERR_ARG;
+ }
+
+ if (!o->device) {
+ sr_warn("gnuplot out: %s: o->device was NULL", __func__);
+ return SR_ERR_ARG;
+ }
+
+ if (!o->device->plugin) {
+ sr_warn("gnuplot out: %s: o->device->plugin was NULL",
+ __func__);
+ return SR_ERR_ARG;
+ }
+
+ if (!(ctx = calloc(1, sizeof(struct context)))) {
+ sr_warn("gnuplot out: %s: ctx calloc failed", __func__);