[PATCH] pwm: bcm7038: fix check of error code returned by devm_ioremap_resource()

Florian Fainelli f.fainelli at gmail.com
Sun Mar 6 17:15:52 PST 2016


Le 05/03/2016 17:21, Vladimir Zapolskiy a écrit :
> 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 at mleia.com>
> Fixes: 3a9f5957020f ("pwm: Add Broadcom BCM7038 PWM controller support")

Acked-by: Florian Fainelli <f.fainelli at gmail.com>

Using pwm: brcmstb for the subject might be a better fit to match the
filename, but this is bike shedding.
-- 
Florian



More information about the linux-arm-kernel mailing list