Re: [patch 1/4] ASoC: dapm: fix error path in snd_soc_dapm_new_pcm

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

 




> On Aug 27, 2017, at 5:43 AM, Mark Brown <broonie@xxxxxxxxxx> wrote:

Thanks for reviewing.
> 
>> On Sat, Aug 26, 2017 at 01:29:25AM -0700, anish kumar wrote:
>> Before freeing the memory, check if it was allcoated.
> 
>> -outfree_w_param:
>>    for (count = 0 ; count < num_params; count++)
>> -        devm_kfree(card->dev, (void *)w_param_text[count]);
>> +            if (w_param_text[count])
>> +            devm_kfree(card->dev, (void *)w_param_text[count]);
> 
> There's no need to do this, devm_kfree() will handle null pointers fine.

Got it. I am waiting for comments on my other patches in this series before sending again.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



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

  Powered by Linux