mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
musb: musb_core: remove duplicate check on resource
Sanity check on resource happening with devm_ioremap_resource(). Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e7020f193a
commit
972b98344b
@ -2080,10 +2080,10 @@ static int musb_probe(struct platform_device *pdev)
|
||||
struct resource *iomem;
|
||||
void __iomem *base;
|
||||
|
||||
iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!iomem || irq <= 0)
|
||||
if (irq <= 0)
|
||||
return -ENODEV;
|
||||
|
||||
iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
base = devm_ioremap_resource(dev, iomem);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
Loading…
Reference in New Issue
Block a user