]> www.infradead.org Git - nvme.git/commitdiff
ALSA/hda: intel-sdw-acpi: cleanup sdw_intel_scan_controller
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tue, 1 Oct 2024 07:06:08 +0000 (15:06 +0800)
committerTakashi Iwai <tiwai@suse.de>
Tue, 15 Oct 2024 05:53:55 +0000 (07:53 +0200)
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
sound/hda/intel-sdw-acpi.c

index 04d6b6beabca5873c33e1f4b585bae1973938f8a..770dabe0124f1d3d715388a27bb989741c9c4efc 100644 (file)
@@ -63,7 +63,6 @@ sdw_intel_scan_controller(struct sdw_intel_acpi_info *info)
                return -EINVAL;
 
        /* Found controller, find links supported */
-       count = 0;
        ret = fwnode_property_read_u8_array(acpi_fwnode_handle(adev),
                                            "mipi-sdw-master-count", &count, 1);
 
@@ -82,7 +81,7 @@ sdw_intel_scan_controller(struct sdw_intel_acpi_info *info)
        if (ret) {
                dev_err(&adev->dev,
                        "Failed to read mipi-sdw-master-count: %d\n", ret);
-               return -EINVAL;
+               return ret;
        }
 
        /* Check count is within bounds */