summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorThomas Perrot <thomas.perrot@bootlin.com>2021-10-22 17:21:04 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-18 16:03:43 +0300
commit07f7a1864929fe705afd9b5b97946fe0b2983064 (patch)
treeb13927c005bb4c192a85fece1446a1f0de836d84 /drivers/spi
parentdb1d9d102ee45b0462237d3257d1520806ab0b4e (diff)
downloadlinux-07f7a1864929fe705afd9b5b97946fe0b2983064.tar.xz
spi: spl022: fix Microwire full duplex mode
[ Upstream commit d81d0e41ed5fe7229a2c9a29d13bad288c7cf2d2 ] 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>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-pl022.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index d1776fea287e..e4ee8b084799 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -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;