@@ -595,16 +595,11 @@ static int usbhs_probe(struct platform_device *pdev)
u32 tmp;
int irq;
- /* check device node */
- if (dev_of_node(dev))
- info = of_device_get_match_data(dev);
- else
- info = renesas_usbhs_get_info(pdev);
-
- /* check platform information */
+ info = of_device_get_match_data(dev);
if (!info) {
- dev_err(dev, "no platform information\n");
- return -EINVAL;
+ info = renesas_usbhs_get_info(pdev);
+ if (!info)
+ return dev_err_probe(dev, -EINVAL, "no platform info\n");
}
/* platform data */