Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

host: ehci-mv: remove duplicate check on resource

Sanity check on resource happening with devm_ioremap_resource().

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Varka Bhadram and committed by
Greg Kroah-Hartman
6144171d e507bf57

-12
-12
drivers/usb/host/ehci-mv.c
··· 169 169 } 170 170 171 171 r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phyregs"); 172 - if (r == NULL) { 173 - dev_err(&pdev->dev, "no phy I/O memory resource defined\n"); 174 - retval = -ENODEV; 175 - goto err_put_hcd; 176 - } 177 - 178 172 ehci_mv->phy_regs = devm_ioremap_resource(&pdev->dev, r); 179 173 if (IS_ERR(ehci_mv->phy_regs)) { 180 174 retval = PTR_ERR(ehci_mv->phy_regs); ··· 176 182 } 177 183 178 184 r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "capregs"); 179 - if (!r) { 180 - dev_err(&pdev->dev, "no I/O memory resource defined\n"); 181 - retval = -ENODEV; 182 - goto err_put_hcd; 183 - } 184 - 185 185 ehci_mv->cap_regs = devm_ioremap_resource(&pdev->dev, r); 186 186 if (IS_ERR(ehci_mv->cap_regs)) { 187 187 retval = PTR_ERR(ehci_mv->cap_regs);