summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-ep93xx.c
diff options
context:
space:
mode:
authorVladimir Zapolskiy2018-11-02 14:39:43 +0100
committerGreg Kroah-Hartman2018-12-01 09:37:26 +0100
commit602162dce8a4cb61686226588161ded7b7ea604c (patch)
tree2ae2d28b158b495469c66cda695794657bf349fc /drivers/gpio/gpio-ep93xx.c
parentmmc: sdhci-pci: Workaround GLK firmware failing to restore the tuning value (diff)
downloadkernel-qcow2-linux-602162dce8a4cb61686226588161ded7b7ea604c.tar.gz
kernel-qcow2-linux-602162dce8a4cb61686226588161ded7b7ea604c.tar.xz
kernel-qcow2-linux-602162dce8a4cb61686226588161ded7b7ea604c.zip
gpio: don't free unallocated ida on gpiochip_add_data_with_key() error path
commit a05a14049999598a3bb6fab12db6b768a0215522 upstream. The change corrects the error path in gpiochip_add_data_with_key() by avoiding to call ida_simple_remove(), if ida_simple_get() returns an error. Note that ida_simple_remove()/ida_free() throws a BUG(), if id argument is negative, it allows to easily check the correctness of the fix by fuzzing the return value from ida_simple_get(). Fixes: ff2b13592299 ("gpio: make the gpiochip a real device") Cc: stable@vger.kernel.org # v4.6+ Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpio/gpio-ep93xx.c')
0 files changed, 0 insertions, 0 deletions