[PATCH net-next v3 08/13] net: mdio: mux-mmioreg: Simplified with dev_err_probe()

Andrew Lunn andrew at lunn.ch
Thu Aug 29 05:53:10 PDT 2024


>  	s->iosize = resource_size(&res);
>  	if (s->iosize != sizeof(uint8_t) &&
>  	    s->iosize != sizeof(uint16_t) &&
>  	    s->iosize != sizeof(uint32_t)) {
> -		dev_err(&pdev->dev, "only 8/16/32-bit registers are supported\n");
> -		return -EINVAL;
> +		return dev_err_probe(&pdev->dev, -EINVAL,
> +				     "only 8/16/32-bit registers are supported\n");

Please think about this change. Why is it wrong?

       Andrew



More information about the linux-arm-kernel mailing list