forked from drath/libratbag
@@ -184,8 +184,8 @@ static int
|
||||
hidpp10drv_probe(struct ratbag_device *device, const struct ratbag_id id)
|
||||
{
|
||||
int rc;
|
||||
struct hidpp10drv_data *drv_data;
|
||||
struct hidpp10_device *dev;
|
||||
struct hidpp10drv_data *drv_data = NULL;
|
||||
struct hidpp10_device *dev = NULL;
|
||||
|
||||
rc = ratbag_open_hidraw(device);
|
||||
if (rc) {
|
||||
@@ -229,7 +229,8 @@ hidpp10drv_probe(struct ratbag_device *device, const struct ratbag_id id)
|
||||
err:
|
||||
free(drv_data);
|
||||
ratbag_set_drv_data(device, NULL);
|
||||
hidpp10_device_destroy(dev);
|
||||
if (dev)
|
||||
hidpp10_device_destroy(dev);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -527,8 +527,7 @@ ratbag_create_button(struct ratbag_profile *profile, unsigned int index)
|
||||
button->profile = profile;
|
||||
button->index = index;
|
||||
|
||||
if (profile)
|
||||
list_insert(&profile->buttons, &button->link);
|
||||
list_insert(&profile->buttons, &button->link);
|
||||
|
||||
if (device->driver->read_button)
|
||||
device->driver->read_button(button);
|
||||
|
||||
Reference in New Issue
Block a user