Merge branch 'for-3.0' into for-3.1
[pandora-kernel.git] / sound / soc / atmel / atmel_ssc_dai.c
index 7fbfa05..f53dc09 100644 (file)
@@ -838,19 +838,18 @@ int atmel_ssc_set_audio(int ssc_id)
        }
 
        ssc_pdev = platform_device_alloc("atmel-ssc-dai", ssc_id);
-       if (!ssc_pdev) {
-               ssc_free(ssc);
+       if (!ssc_pdev)
                return -ENOMEM;
-       }
 
        /* If we can grab the SSC briefly to parent the DAI device off it */
        ssc = ssc_request(ssc_id);
        if (IS_ERR(ssc))
                pr_warn("Unable to parent ASoC SSC DAI on SSC: %ld\n",
                        PTR_ERR(ssc));
-       else
+       else {
                ssc_pdev->dev.parent = &(ssc->pdev->dev);
-       ssc_free(ssc);
+               ssc_free(ssc);
+       }
 
        ret = platform_device_add(ssc_pdev);
        if (ret < 0)