mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
usb: phy: rcar-usb: 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: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
687f16b859
commit
28a26945df
1 changed files with 3 additions and 5 deletions
|
@ -195,11 +195,9 @@ static int rcar_usb_phy_probe(struct platform_device *pdev)
|
||||||
return PTR_ERR(reg0);
|
return PTR_ERR(reg0);
|
||||||
|
|
||||||
res1 = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
res1 = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||||
if (res1) {
|
reg1 = devm_ioremap_resource(dev, res1);
|
||||||
reg1 = devm_ioremap_resource(dev, res1);
|
if (IS_ERR(reg1))
|
||||||
if (IS_ERR(reg1))
|
return PTR_ERR(reg1);
|
||||||
return PTR_ERR(reg1);
|
|
||||||
}
|
|
||||||
|
|
||||||
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
||||||
if (!priv)
|
if (!priv)
|
||||||
|
|
Loading…
Reference in a new issue