Skip to content

Commit 9d94c58

Browse files
plbossarttiwai
authored andcommitted
ALSA/hda: intel-sdw-acpi: cleanup sdw_intel_scan_controller
Remove unnecessary initialization and un-shadow return code. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20241001070611.63288-2-yung-chuan.liao@linux.intel.com
1 parent 1e9c708 commit 9d94c58

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sound/hda/intel-sdw-acpi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ sdw_intel_scan_controller(struct sdw_intel_acpi_info *info)
6363
return -EINVAL;
6464

6565
/* Found controller, find links supported */
66-
count = 0;
6766
ret = fwnode_property_read_u8_array(acpi_fwnode_handle(adev),
6867
"mipi-sdw-master-count", &count, 1);
6968

@@ -82,7 +81,7 @@ sdw_intel_scan_controller(struct sdw_intel_acpi_info *info)
8281
if (ret) {
8382
dev_err(&adev->dev,
8483
"Failed to read mipi-sdw-master-count: %d\n", ret);
85-
return -EINVAL;
84+
return ret;
8685
}
8786

8887
/* Check count is within bounds */

0 commit comments

Comments
 (0)