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

Configure Feed

Select the types of activity you want to include in your feed.

usb: renesas_usbhs: Simplify obtaining device data

Simplify probe() by removing redundant dev->of_node check.

While at it, replace dev_err->dev_err_probe for error path.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20240319105356.87287-3-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Biju Das and committed by
Greg Kroah-Hartman
a79c5b6f c4f42646

+4 -9
+4 -9
drivers/usb/renesas_usbhs/common.c
··· 595 595 u32 tmp; 596 596 int irq; 597 597 598 - /* check device node */ 599 - if (dev_of_node(dev)) 600 - info = of_device_get_match_data(dev); 601 - else 602 - info = renesas_usbhs_get_info(pdev); 603 - 604 - /* check platform information */ 598 + info = of_device_get_match_data(dev); 605 599 if (!info) { 606 - dev_err(dev, "no platform information\n"); 607 - return -EINVAL; 600 + info = renesas_usbhs_get_info(pdev); 601 + if (!info) 602 + return dev_err_probe(dev, -EINVAL, "no platform info\n"); 608 603 } 609 604 610 605 /* platform data */