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]

 



On 06/07/2024 21:47, Christophe JAILLET wrote:
> Le 06/07/2024 à 17:07, Javier Carrasco a écrit :
>> dev_err_probe() is used in some probe error paths, yet the
>> "dev_err() + return" pattern is used in some others.
>>
>> Use dev_err_probe() in all error paths with that construction.
>>
>> Suggested-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
>> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>
>> ---
> 
> ...
> 
>> -            if (ret < 0) {
>> -                dev_err(dev, "failed to parse devfn: %d\n", ret);
>> -                return ret;
>> -            }
>> +            if (ret < 0)
>> +                return dev_err_probe(dev, ret,
>> +                             "failed to parse devfn: %d\n", ret);
> 
> Hi,
> 
> with dev_err_probe(), there is no more need to add 'ret' explicitly in
> the message.
> 
> CJ

You are right, thank you. I will remove that from the original message
for v2.

Best regards,
Javier Carrasco




[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