]> git.baikalelectronics.ru Git - kernel.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)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 23 Mar 2016 16:11:45 +0000 (17:11 +0100)
commit1032fa0db75e0e8cc1291d6f321c7223cfbb1be0
treee479810eace5b41648c2783aedf5a20383c5706c
parent1f4f4aac8c081c099b44f0cc100dc8e7b8b8f21e
pwm: brcmstb: Fix check of devm_ioremap_resource() return code

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: 24970be97cd1 ("pwm: Add Broadcom BCM7038 PWM controller support")
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-brcmstb.c