]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
pwm: brcmstb: Fix check of devm_ioremap_resource() return code
authorVladimir Zapolskiy <vz@mleia.com>
Sun, 6 Mar 2016 01:21:46 +0000 (03:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 May 2016 21:48:47 +0000 (14:48 -0700)
commit194de738b69315721adc4e6dbafe81c790b318c8
tree73663cf36bafeeb7e8767d798b9dbac73f8e4ea0
parent385af1d58254412e42d06b19e3cbe60b55cf34a6
pwm: brcmstb: Fix check of devm_ioremap_resource() return code

commit c5857e3f94ab2719dfac649a146cb5dd6f21fcf3 upstream.

The change fixes potential oops while accessing iomem on invalid address
if devm_ioremap_resource() fails due to some reason.

The devm_ioremap_resource() function returns ERR_PTR() and never returns
NULL, which makes useless a following check for NULL.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Fixes: 3a9f5957020f ("pwm: Add Broadcom BCM7038 PWM controller support")
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pwm/pwm-brcmstb.c