diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-01 12:01:10 -0700 | 
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-01 12:01:10 -0700 | 
| commit | ef99f3aee9641d10a7c80d4803d2f0f004c797ca (patch) | |
| tree | 83f14ccef66db48fc4178bd8b973462006de86b8 /drivers/pinctrl/pinmux.c | |
| parent | cb06ff102e2d79a82cf780aa5e6947b2e0529ac0 (diff) | |
| parent | 07961ac7c0ee8b546658717034fe692fd12eefa9 (diff) | |
| download | olio-linux-3.10-ef99f3aee9641d10a7c80d4803d2f0f004c797ca.tar.xz olio-linux-3.10-ef99f3aee9641d10a7c80d4803d2f0f004c797ca.zip  | |
Merge 3.9-rc5 into tty-next
We need the fixes here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pinctrl/pinmux.c')
| -rw-r--r-- | drivers/pinctrl/pinmux.c | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index 1a00658b3ea..bd83c8b01cd 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c @@ -194,6 +194,11 @@ static const char *pin_free(struct pinctrl_dev *pctldev, int pin,  	}  	if (!gpio_range) { +		/* +		 * A pin should not be freed more times than allocated. +		 */ +		if (WARN_ON(!desc->mux_usecount)) +			return NULL;  		desc->mux_usecount--;  		if (desc->mux_usecount)  			return NULL;  |