[PATCH] [net/ethernet] arc_emac: Add error handling in emac_rockchip_probe
Jakub Kicinski
kuba at kernel.org
Fri Dec 1 20:11:46 PST 2023
On Wed, 29 Nov 2023 19:13:18 -0800 Haoran Liu wrote:
> Although the error addressed by this patch may not occur in the current
> environment, I still suggest implementing these error handling routines
> if the function is not highly time-sensitive. As the environment evolves
> or the code gets reused in different contexts, there's a possibility that
> these errors might occur. Addressing them now can prevent potential
> debugging efforts in the future, which could be quite resource-intensive.
Please skip this pointless boilerplate.
> match = of_match_node(emac_rockchip_dt_ids, dev->of_node);
> + if (!match) {
> + dev_err(dev, "No matching device found\n");
> + return -ENODEV;
"device" and ENODEV are not right here.
--
pw-bot: cr
More information about the Linux-rockchip
mailing list