summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/soc/omap/omap-hdmi-card.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/omap/omap-hdmi-card.c b/sound/soc/omap/omap-hdmi-card.c
index b1cf892a2cd..c7695c9eee5 100644
--- a/sound/soc/omap/omap-hdmi-card.c
+++ b/sound/soc/omap/omap-hdmi-card.c
@@ -107,7 +107,8 @@ static __devinit int omap_hdmi_probe(struct platform_device *pdev)
return 0;
err_register_card:
- platform_device_unregister(card_data->codec_pdev);
+ if (!IS_ERR(card_data->codec_pdev))
+ platform_device_unregister(card_data->codec_pdev);
return ret;
}