diff options
author | Guenter Roeck <linux@roeck-us.net> | 2012-11-13 16:27:19 -0500 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2012-11-13 16:27:19 -0500 |
commit | aa1e3e81e75ceb3d977c3292cefafcd5179eb8b8 (patch) | |
tree | 6cfef3a9b0c4f6a8f11aaa3199ba704e7c4dd605 /drivers/i2c/muxes | |
parent | d85c8a6ab2bb0ba067a2a72c63c3bd20e6788996 (diff) |
i2c-mux-pinctrl: Fix probe error path
When allocating the memory for i2c busses, the code checked the wrong
variable and thus never detected if there was a memory error.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Cc: stable@vger.kernel.org
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/muxes')
-rw-r--r-- | drivers/i2c/muxes/i2c-mux-pinctrl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/i2c-mux-pinctrl.c index 5f097f309b9f..7fa5b24b16db 100644 --- a/drivers/i2c/muxes/i2c-mux-pinctrl.c +++ b/drivers/i2c/muxes/i2c-mux-pinctrl.c | |||
@@ -169,7 +169,7 @@ static int __devinit i2c_mux_pinctrl_probe(struct platform_device *pdev) | |||
169 | mux->busses = devm_kzalloc(&pdev->dev, | 169 | mux->busses = devm_kzalloc(&pdev->dev, |
170 | sizeof(mux->busses) * mux->pdata->bus_count, | 170 | sizeof(mux->busses) * mux->pdata->bus_count, |
171 | GFP_KERNEL); | 171 | GFP_KERNEL); |
172 | if (!mux->states) { | 172 | if (!mux->busses) { |
173 | dev_err(&pdev->dev, "Cannot allocate busses\n"); | 173 | dev_err(&pdev->dev, "Cannot allocate busses\n"); |
174 | ret = -ENOMEM; | 174 | ret = -ENOMEM; |
175 | goto err; | 175 | goto err; |