mirror of
https://github.com/torvalds/linux.git
synced 2025-04-12 16:47:42 +00:00
clk: mmp: pxa1908-mpmu: Fix a NULL vs IS_ERR() check
The devm_kzalloc() function returns NULL on error, not error pointers. Update the check to match. Fixes: ebac87cdd230 ("clk: mmp: Add Marvell PXA1908 MPMU driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/5b3b963d-ecae-4819-be47-d82e8a58e64b@stanley.mountain Acked-by: Duje Mihanović <duje.mihanovic@skole.hr> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
40384c840e
commit
7def56f841
@ -78,8 +78,8 @@ static int pxa1908_mpmu_probe(struct platform_device *pdev)
|
||||
struct pxa1908_clk_unit *pxa_unit;
|
||||
|
||||
pxa_unit = devm_kzalloc(&pdev->dev, sizeof(*pxa_unit), GFP_KERNEL);
|
||||
if (IS_ERR(pxa_unit))
|
||||
return PTR_ERR(pxa_unit);
|
||||
if (!pxa_unit)
|
||||
return -ENOMEM;
|
||||
|
||||
pxa_unit->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(pxa_unit->base))
|
||||
|
Loading…
x
Reference in New Issue
Block a user