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

Unverified Commit 53b6d0ad authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown
Browse files

ASoC: Intel: cht_bsw_rt5672: remove useless test



For some reason we test if the machine is passed as a parameter before
fixing up the codec name. This is unnecessary, generates false
positives in static analysis tools and done only in this machine
driver, remove and adjust indentation.

Reported-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b291f42a
Loading
Loading
Loading
Loading
+9 −12
Original line number Original line Diff line number Diff line
@@ -411,7 +411,6 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
	strcpy(drv->codec_name, RT5672_I2C_DEFAULT);
	strcpy(drv->codec_name, RT5672_I2C_DEFAULT);


	/* fixup codec name based on HID */
	/* fixup codec name based on HID */
	if (mach) {
	i2c_name = acpi_dev_get_first_match_name(mach->id, NULL, -1);
	i2c_name = acpi_dev_get_first_match_name(mach->id, NULL, -1);
	if (i2c_name) {
	if (i2c_name) {
		snprintf(drv->codec_name, sizeof(drv->codec_name),
		snprintf(drv->codec_name, sizeof(drv->codec_name),
@@ -419,13 +418,11 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
		for (i = 0; i < ARRAY_SIZE(cht_dailink); i++) {
		for (i = 0; i < ARRAY_SIZE(cht_dailink); i++) {
			if (!strcmp(cht_dailink[i].codec_name,
			if (!strcmp(cht_dailink[i].codec_name,
				RT5672_I2C_DEFAULT)) {
				RT5672_I2C_DEFAULT)) {
					cht_dailink[i].codec_name =
				cht_dailink[i].codec_name = drv->codec_name;
						drv->codec_name;
				break;
				break;
			}
			}
		}
		}
	}
	}
	}


	/* override plaform name, if required */
	/* override plaform name, if required */
	platform_name = mach->mach_params.platform;
	platform_name = mach->mach_params.platform;