if ((!vals) ||
(sscanf(vals, "%f %f %f %f %f %f",
&cal[0], &cal[1], &cal[2], &cal[3], &cal[4], &cal[5]) != 6))
- return;
+ {
+ udev_device_unref(udev_device);
+ return;
+ }
+ udev_device_unref(udev_device);
ELOGF("E_INPUT_EVDEV", "calibration_set cal[%lf %lf %lf %lf %lf %lf] (%d x %d)",
NULL, cal[0], cal[1], cal[2], cal[3], cal[4], cal[5], w, h);
- cal[2] /= w;
- cal[5] /= h;
status =
libinput_device_config_calibration_set_matrix(edev->device, cal);
if ((!vals) ||
(sscanf(vals, "%f %f %f %f %f %f",
&cal[0], &cal[1], &cal[2], &cal[3], &cal[4], &cal[5]) != 6))
- return;
+ {
+ udev_device_unref(udev_device);
+ return;
+ }
+ udev_device_unref(udev_device);
ELOGF("E_INPUT_EVDEV", "axis_size_set cal[%lf %lf %lf %lf %lf %lf] (%d x %d)",
NULL, cal[0], cal[1], cal[2], cal[3], cal[4], cal[5], w, h);