summaryrefslogtreecommitdiff
path: root/drivers/soundwire
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2021-05-11 05:50:35 +0300
committerVinod Koul <vkoul@kernel.org>2021-05-11 15:20:33 +0300
commit037219925e7a802c1d038af18cec3d0a8c88a368 (patch)
tree65e143becaeb732388a92f2ca6473de97189cff0 /drivers/soundwire
parent36eee232df7b41dce5a26e4da2d083f6a6b0f476 (diff)
downloadlinux-037219925e7a802c1d038af18cec3d0a8c88a368.tar.xz
soundwire: dmi-quirks: remove duplicate initialization
cppcheck warning: drivers/soundwire/dmi-quirks.c:85:12: style: Redundant initialization for 'map'. The initialized value is overwritten before it is read. [redundantInitialization] for (map = dmi_id->driver_data; map->adr; map++) { ^ drivers/soundwire/dmi-quirks.c:83:25: note: map is initialized struct adr_remap *map = dmi_id->driver_data; ^ drivers/soundwire/dmi-quirks.c:85:12: note: map is overwritten for (map = dmi_id->driver_data; map->adr; map++) { ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20210511025035.25233-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r--drivers/soundwire/dmi-quirks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soundwire/dmi-quirks.c b/drivers/soundwire/dmi-quirks.c
index 82061c1d9835..5db0a2443a1d 100644
--- a/drivers/soundwire/dmi-quirks.c
+++ b/drivers/soundwire/dmi-quirks.c
@@ -80,7 +80,7 @@ u64 sdw_dmi_override_adr(struct sdw_bus *bus, u64 addr)
/* check if any address remap quirk applies */
dmi_id = dmi_first_match(adr_remap_quirk_table);
if (dmi_id) {
- struct adr_remap *map = dmi_id->driver_data;
+ struct adr_remap *map;
for (map = dmi_id->driver_data; map->adr; map++) {
if (map->adr == addr) {