ALSA: HDA: Return -ENODEV if hdmi_pcm_open() fails
Sumit Bhattacharya [Thu, 22 Mar 2012 14:17:16 +0000 (19:17 +0530)]
Return -ENODEV instead of -EAGAIN if hdmi_pcm_open() fails. There is
a chance of user space getting hung while trying to open pcm device
if -EAGAIN is returned.

Bug 949659

Change-Id: If4ff4078d8e0d882859ac97742e7d48d2e6c230c
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/91819
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>

sound/pci/hda/patch_hdmi.c

index 493d368..fcc32f5 100644 (file)
@@ -840,7 +840,7 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,
                        }
                }
                if (!eld->lpcm_sad_ready)
-                       return -EAGAIN;
+                       return -ENODEV;
        }
 #endif