mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 15:14:38 +01:00
hidpp10: use _cleanup_ for a profile
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -615,12 +615,11 @@ hidpp10drv_probe(struct ratbag_device *device)
|
||||
|
||||
if (hidpp10drv_fill_from_profile(device, dev)) {
|
||||
/* Fall back to something that every mouse has */
|
||||
struct ratbag_profile *profile;
|
||||
_cleanup_profile_ struct ratbag_profile *profile;
|
||||
|
||||
ratbag_device_init_profiles(device, 1, 1, 3, 0);
|
||||
profile = ratbag_device_get_profile(device, 0);
|
||||
profile->is_active = true;
|
||||
ratbag_profile_unref(profile);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user