Re: [PATCH 1/2] PCI: kirin: use dev_err_probe() in probe error paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

[...]
> Use dev_err_probe() in all error paths with that construction.

Thank you for this nice refactoring!  Much appreciated.

[...]
> -	if (ret > MAX_PCI_SLOTS) {
> -		dev_err(dev, "Too many GPIO clock requests!\n");
> -		return -EINVAL;
> -	}
> +	if (ret > MAX_PCI_SLOTS)
> +		return dev_err_probe(dev, -EINVAL,
> +				     "Too many GPIO clock requests!\n");

Something that would be nice to get consistent: adjust all the errors
capitalisation to make everything consistent, as appropriate, so that it's
either all lower-case or title case.  A mix of both often looks a bit
sloppy.

Do you think this would be something you would be willing to clean up in
this series too?  Especially since we are touching this code now.

> -	if (!dev->of_node) {
> -		dev_err(dev, "NULL node\n");
> -		return -EINVAL;
> -	}
> +	if (!dev->of_node)
> +		return dev_err_probe(dev, -EINVAL, "NULL node\n");

Perhaps -ENODEV would be more appropriate here?  Also, the error message is
not the best, as such, I wonder if we could make it better while we are at
it, so to speak.

	Krzysztof




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux