Skip to content

Commit

Permalink
spi: spl022: fix Microwire full duplex mode
Browse files Browse the repository at this point in the history
[ Upstream commit d81d0e4 ]

There are missing braces in the function that verify controller parameters,
then an error is always returned when the parameter to select Microwire
frames operation is used on devices allowing it.

Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
Link: https://lore.kernel.org/r/20211022142104.1386379-1-thomas.perrot@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
tprrt authored and gregkh committed Nov 18, 2021
1 parent db1d9d1 commit 07f7a18
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/spi/spi-pl022.c
Expand Up @@ -1723,12 +1723,13 @@ static int verify_controller_parameters(struct pl022 *pl022,
return -EINVAL;
}
} else {
if (chip_info->duplex != SSP_MICROWIRE_CHANNEL_FULL_DUPLEX)
if (chip_info->duplex != SSP_MICROWIRE_CHANNEL_FULL_DUPLEX) {
dev_err(&pl022->adev->dev,
"Microwire half duplex mode requested,"
" but this is only available in the"
" ST version of PL022\n");
return -EINVAL;
return -EINVAL;
}
}
}
return 0;
Expand Down

0 comments on commit 07f7a18

Please sign in to comment.