Skip to content
Commit 7d658893 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Bartosz Golaszewski
Browse files

gpio: mpc8xxx: Fix a potential double iounmap call in 'mpc8xxx_probe()'

Commit 76c47d14 ("gpio: mpc8xxx: Add ACPI support") has switched to a
managed version when dealing with 'mpc8xxx_gc->regs'. So the corresponding
'iounmap()' call in the error handling path and in the remove should be
removed to avoid a double unmap.

This also allows some simplification in the probe. All the error handling
paths related to managed resources can be direct returns and a NULL check
in what remains in the error handling path can be removed.

Fixes: 76c47d14

 ("gpio: mpc8xxx: Add ACPI support")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
parent 555bda42
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment