]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Fixed compilation problem
authorJaroslav Kysela <perex@perex.cz>
Tue, 4 Feb 2003 13:44:11 +0000 (13:44 +0000)
committerJaroslav Kysela <perex@perex.cz>
Tue, 4 Feb 2003 13:44:11 +0000 (13:44 +0000)
src/seq/seq_hw.c

index 532395ef5910cce4c8edee19c6c5f082bfb632f6..7d330d7e38dbc2b94b99b5485fcb8322d552f29f 100644 (file)
@@ -414,7 +414,7 @@ snd_seq_ops_t snd_seq_hw_ops = {
 
 int snd_seq_hw_open(snd_seq_t **handle, const char *name, int streams, int mode)
 {
-       int fd, ver, client, fmode;
+       int fd, ver, client, fmode, ret;
        char filename[32];
        snd_seq_t *seq;
        snd_seq_hw_t *hw;
@@ -455,8 +455,9 @@ int snd_seq_hw_open(snd_seq_t **handle, const char *name, int streams, int mode)
        }
        if (ioctl(fd, SNDRV_SEQ_IOCTL_PVERSION, &ver) < 0) {
                SYSERR("SNDRV_SEQ_IOCTL_PVERSION failed");
+               ret = -errno;
                close(fd);
-               return -errno;
+               return ret;
        }
        if (SNDRV_PROTOCOL_INCOMPATIBLE(ver, SNDRV_SEQ_VERSION_MAX)) {
                close(fd);