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

Commit 8278ca8f authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela
Browse files

[ALSA] Fix check of enable module option



Fix the check of enable module option in probe of platform_device drivers.
It shouldn't break the loop but just ignore if enable[i] is false.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 1a56f8d6
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -669,8 +669,10 @@ static int __init alsa_card_dummy_init(void)
		return err;

	cards = 0;
	for (i = 0; i < SNDRV_CARDS && enable[i]; i++) {
	for (i = 0; i < SNDRV_CARDS; i++) {
		struct platform_device *device;
		if (! enable[i])
			continue;
		device = platform_device_register_simple(SND_DUMMY_DRIVER,
							 i, NULL, 0);
		if (IS_ERR(device)) {
+3 −1
Original line number Diff line number Diff line
@@ -240,8 +240,10 @@ static int __init alsa_card_mpu401_init(void)
		return err;

	devices = 0;
	for (i = 0; i < SNDRV_CARDS && enable[i]; i++) {
	for (i = 0; i < SNDRV_CARDS; i++) {
		struct platform_device *device;
		if (! enable[i])
			continue;
#ifdef CONFIG_PNP
		if (pnp[i])
			continue;
+3 −1
Original line number Diff line number Diff line
@@ -989,8 +989,10 @@ static int __init alsa_card_serial_init(void)
		return err;

	cards = 0;
	for (i = 0; i < SNDRV_CARDS && enable[i]; i++) {
	for (i = 0; i < SNDRV_CARDS; i++) {
		struct platform_device *device;
		if (! enable[i])
			continue;
		device = platform_device_register_simple(SND_SERIAL_DRIVER,
							 i, NULL, 0);
		if (IS_ERR(device)) {
+3 −1
Original line number Diff line number Diff line
@@ -163,8 +163,10 @@ static int __init alsa_card_virmidi_init(void)
		return err;

	cards = 0;
	for (i = 0; i < SNDRV_CARDS && enable[i]; i++) {
	for (i = 0; i < SNDRV_CARDS; i++) {
		struct platform_device *device;
		if (! enable[i])
			continue;
		device = platform_device_register_simple(SND_VIRMIDI_DRIVER,
							 i, NULL, 0);
		if (IS_ERR(device)) {
+3 −1
Original line number Diff line number Diff line
@@ -187,8 +187,10 @@ static int __init alsa_card_ad1848_init(void)
		return err;

	cards = 0;
	for (i = 0; i < SNDRV_CARDS && enable[i]; i++) {
	for (i = 0; i < SNDRV_CARDS; i++) {
		struct platform_device *device;
		if (! enable[i])
			continue;
		device = platform_device_register_simple(SND_AD1848_DRIVER,
							 i, NULL, 0);
		if (IS_ERR(device)) {
Loading