summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorSachin Nikam <snikam@nvidia.com>2015-12-07 23:42:41 -0500
committerSameer Pujar <spujar@nvidia.com>2017-08-07 05:26:21 -0400
commita33bd5974b506b86b605d15080314ac1b6b08406 (patch)
treeccb46964ead49c7c31fef982e10f7dff13ee311d /sound/pci/hda
parent8369f070c4b2ce4b4fb5b87517a36922102e4d34 (diff)
tegra: hda: fix coverity defect
NULL check of hda->dev before calling function pm_runtime_put(hda->dev); Coverity ID 20214 Bug 200116059 Change-Id: I5b034f2d72e27596f0f48546926253c7fdb47eff Signed-off-by: Sachin Nikam <snikam@nvidia.com> Reviewed-on: http://git-master/r/842692 Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_tegra.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index 6eb29ea63..931c98f7a 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -311,7 +311,8 @@ static int hda_tegra_resume(struct device *dev)
311 311
312 snd_power_change_state(card, SNDRV_CTL_POWER_D0); 312 snd_power_change_state(card, SNDRV_CTL_POWER_D0);
313 313
314 pm_runtime_put(hda->dev); 314 if (hda->dev)
315 pm_runtime_put(hda->dev);
315 316
316 return 0; 317 return 0;
317} 318}