From: Thomas Perrot Date: Fri, 22 Oct 2021 14:21:04 +0000 (+0200) Subject: spi: spl022: fix Microwire full duplex mode X-Git-Tag: v5.15~17^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d81d0e41ed5fe7229a2c9a29d13bad288c7cf2d2;p=platform%2Fkernel%2Flinux-starfive.git spi: spl022: fix Microwire full duplex mode 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 Link: https://lore.kernel.org/r/20211022142104.1386379-1-thomas.perrot@bootlin.com Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index feebda6..e4484ac 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -1716,12 +1716,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;