Merge tag 'regmap-fix-v6.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap

Pull regmap fixes from Mark Brown:
"A couple of small fixes, one error handling one and another for misuse
of the hwspinlock API"

* tag 'regmap-fix-v6.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
regmap: Fix race condition in hwspinlock irqsave routine
regmap: maple: free entry on mas_store_gfp() failure

+9 -6
+6 -5
drivers/base/regmap/regcache-maple.c
··· 95 95 96 96 mas_unlock(&mas); 97 97 98 - if (ret == 0) { 99 - kfree(lower); 100 - kfree(upper); 98 + if (ret) { 99 + kfree(entry); 100 + return ret; 101 101 } 102 - 103 - return ret; 102 + kfree(lower); 103 + kfree(upper); 104 + return 0; 104 105 } 105 106 106 107 static int regcache_maple_drop(struct regmap *map, unsigned int min,
+3 -1
drivers/base/regmap/regmap.c
··· 408 408 static void regmap_lock_hwlock_irqsave(void *__map) 409 409 { 410 410 struct regmap *map = __map; 411 + unsigned long flags = 0; 411 412 412 413 hwspin_lock_timeout_irqsave(map->hwlock, UINT_MAX, 413 - &map->spinlock_flags); 414 + &flags); 415 + map->spinlock_flags = flags; 414 416 } 415 417 416 418 static void regmap_unlock_hwlock(void *__map)