28 Nov
2014
28 Nov
'14
5:03 p.m.
On Thu, Nov 27, 2014 at 10:02:42PM +0100, Peter Rosin wrote:
- routes = devm_kzalloc(card->dev, num_routes * sizeof(*routes),
- old_routes = card->num_dapm_routes;
- routes = devm_kzalloc(card->dev,
if (!routes) { dev_err(card->dev,(old_routes + num_routes) * sizeof(*routes), GFP_KERNEL);
@@ -4611,9 +4613,11 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, return -EINVAL; }
- memcpy(routes, card->dapm_routes, old_routes * sizeof(*routes));
Aren't we open coding krealloc() here?