Commit afb923b8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 1f664bbd 4b58aac9
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -95,12 +95,13 @@ static int regcache_maple_write(struct regmap *map, unsigned int reg,

	mas_unlock(&mas);

	if (ret == 0) {
	if (ret) {
		kfree(entry);
		return ret;
	}
	kfree(lower);
	kfree(upper);
	}
	
	return ret;
	return 0;
}

static int regcache_maple_drop(struct regmap *map, unsigned int min,
+3 −1
Original line number Diff line number Diff line
@@ -408,9 +408,11 @@ static void regmap_lock_hwlock_irq(void *__map)
static void regmap_lock_hwlock_irqsave(void *__map)
{
	struct regmap *map = __map;
	unsigned long flags = 0;

	hwspin_lock_timeout_irqsave(map->hwlock, UINT_MAX,
				    &map->spinlock_flags);
				    &flags);
	map->spinlock_flags = flags;
}

static void regmap_unlock_hwlock(void *__map)