Re: [PATCH 2/4] ASoC: codecs: wcd934x: Simplify with dev_err_probe

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

 



On 17/04/2023 17:33, Mark Brown wrote:
> On Mon, Apr 17, 2023 at 04:14:51PM +0200, Krzysztof Kozlowski wrote:
> 
>> Code can be a bit simpler with dev_err_probe().
> 
>> -	if (IS_ERR(wcd->if_regmap)) {
>> -		dev_err(dev, "Failed to allocate ifc register map\n");
>> -		return PTR_ERR(wcd->if_regmap);
>> -	}
>> +	if (IS_ERR(wcd->if_regmap))
>> +		return dev_err_probe(dev, PTR_ERR(wcd->if_regmap),
>> +				     "Failed to allocate ifc register map\n");
> 
> This is a functional change.

Hmm... I don't see it. Return value is the same, same message is
printed, same condition. Did I make some copy-paste error?

Best regards,
Krzysztof




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux