OSDN Git Service

rtc: hym8563: Return -EINVAL if the time is known to be invalid
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / sound / sound_core.c
index 11e953a..20d4e2e 100644 (file)
@@ -287,7 +287,8 @@ retry:
                                goto retry;
                        }
                        spin_unlock(&sound_loader_lock);
-                       return -EBUSY;
+                       r = -EBUSY;
+                       goto fail;
                }
        }
 
@@ -655,7 +656,7 @@ static void cleanup_oss_soundcore(void)
 static int __init init_oss_soundcore(void)
 {
        if (preclaim_oss &&
-           register_chrdev(SOUND_MAJOR, "sound", &soundcore_fops) == -1) {
+           register_chrdev(SOUND_MAJOR, "sound", &soundcore_fops) < 0) {
                printk(KERN_ERR "soundcore: sound device already in use.\n");
                return -EBUSY;
        }