Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0ac642d authored by Rene Herman's avatar Rene Herman Committed by Jaroslav Kysela
Browse files

[ALSA] continue on IS_ERR from platform device registration



Continue with the next one on error from device registration.

This would seem the correct thing to do, even if it's not the probe()
error that we're getting.

Signed-off-by: default avatarRene Herman <rene.herman@keyaccess.nl>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 12831c15
Loading
Loading
Loading
Loading
+4 −10
Original line number Diff line number Diff line
@@ -193,10 +193,8 @@ static int __init alsa_card_ad1848_init(void)
			continue;
		device = platform_device_register_simple(SND_AD1848_DRIVER,
							 i, NULL, 0);
		if (IS_ERR(device)) {
			err = PTR_ERR(device);
			goto errout;
		}
		if (IS_ERR(device))
			continue;
		devices[i] = device;
		cards++;
	}
@@ -204,14 +202,10 @@ static int __init alsa_card_ad1848_init(void)
#ifdef MODULE
		printk(KERN_ERR "AD1848 soundcard not found or device busy\n");
#endif
		err = -ENODEV;
		goto errout;
		snd_ad1848_unregister_all();
		return -ENODEV;
	}
	return 0;

 errout:
	snd_ad1848_unregister_all();
	return err;
}

static void __exit alsa_card_ad1848_exit(void)
+4 −10
Original line number Diff line number Diff line
@@ -699,10 +699,8 @@ static int __init alsa_card_cmi8330_init(void)
			continue;
		device = platform_device_register_simple(CMI8330_DRIVER,
							 i, NULL, 0);
		if (IS_ERR(device)) {
			err = PTR_ERR(device);
			goto errout;
		}
		if (IS_ERR(device))
			continue;
		platform_devices[i] = device;
		cards++;
	}
@@ -719,14 +717,10 @@ static int __init alsa_card_cmi8330_init(void)
#ifdef MODULE
		snd_printk(KERN_ERR "CMI8330 not found or device busy\n");
#endif
		err = -ENODEV;
		goto errout;
		snd_cmi8330_unregister_all();
		return -ENODEV;
	}
	return 0;

 errout:
	snd_cmi8330_unregister_all();
	return err;
}

static void __exit alsa_card_cmi8330_exit(void)
+4 −10
Original line number Diff line number Diff line
@@ -209,10 +209,8 @@ static int __init alsa_card_cs4231_init(void)
			continue;
		device = platform_device_register_simple(SND_CS4231_DRIVER,
							 i, NULL, 0);
		if (IS_ERR(device)) {
			err = PTR_ERR(device);
			goto errout;
		}
		if (IS_ERR(device))
			continue;
		devices[i] = device;
		cards++;
	}
@@ -220,14 +218,10 @@ static int __init alsa_card_cs4231_init(void)
#ifdef MODULE
		printk(KERN_ERR "CS4231 soundcard not found or device busy\n");
#endif
		err = -ENODEV;
		goto errout;
		snd_cs4231_unregister_all();
		return -ENODEV;
	}
	return 0;

 errout:
	snd_cs4231_unregister_all();
	return err;
}

static void __exit alsa_card_cs4231_exit(void)
+4 −10
Original line number Diff line number Diff line
@@ -780,10 +780,8 @@ static int __init alsa_card_cs423x_init(void)
			continue;
		device = platform_device_register_simple(CS423X_DRIVER,
							 i, NULL, 0);
		if (IS_ERR(device)) {
			err = PTR_ERR(device);
			goto errout;
		}
		if (IS_ERR(device))
			continue;
		platform_devices[i] = device;
		snd_cs423x_devices++;
	}
@@ -802,14 +800,10 @@ static int __init alsa_card_cs423x_init(void)
#ifdef MODULE
		printk(KERN_ERR IDENT " soundcard not found or device busy\n");
#endif
		err = -ENODEV;
		goto errout;
		snd_cs423x_unregister_all();
		return -ENODEV;
	}
	return 0;

 errout:
	snd_cs423x_unregister_all();
	return err;
}

static void __exit alsa_card_cs423x_exit(void)
+4 −10
Original line number Diff line number Diff line
@@ -213,10 +213,8 @@ static int __init alsa_card_es1688_init(void)
			continue;
		device = platform_device_register_simple(ES1688_DRIVER,
							 i, NULL, 0);
		if (IS_ERR(device)) {
			err = PTR_ERR(device);
			goto errout;
		}
		if (IS_ERR(device))
			continue;
		devices[i] = device;
		cards++;
	}
@@ -224,14 +222,10 @@ static int __init alsa_card_es1688_init(void)
#ifdef MODULE
		printk(KERN_ERR "ESS AudioDrive ES1688 soundcard not found or device busy\n");
#endif
		err = -ENODEV;
		goto errout;
		snd_es1688_unregister_all();
		return -ENODEV;
	}
	return 0;

 errout:
	snd_es1688_unregister_all();
	return err;
}

static void __exit alsa_card_es1688_exit(void)
Loading