Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2cdcd951 authored by Nicolas Ferre's avatar Nicolas Ferre Committed by Mark Brown
Browse files

ASoC: atmel_ssc_dai: fix ssc error path



We do not have to free a resource that is not allocated yet.

Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 97b4fc3c
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -838,10 +838,8 @@ int atmel_ssc_set_audio(int ssc_id)
	}
	}


	ssc_pdev = platform_device_alloc("atmel-ssc-dai", ssc_id);
	ssc_pdev = platform_device_alloc("atmel-ssc-dai", ssc_id);
	if (!ssc_pdev) {
	if (!ssc_pdev)
		ssc_free(ssc);
		return -ENOMEM;
		return -ENOMEM;
	}


	/* If we can grab the SSC briefly to parent the DAI device off it */
	/* If we can grab the SSC briefly to parent the DAI device off it */
	ssc = ssc_request(ssc_id);
	ssc = ssc_request(ssc_id);