Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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>

authored by

Thomas Perrot and committed by
Mark Brown
d81d0e41 f09f6dfe

+3 -2
+3 -2
drivers/spi/spi-pl022.c
··· 1716 1716 return -EINVAL; 1717 1717 } 1718 1718 } else { 1719 - if (chip_info->duplex != SSP_MICROWIRE_CHANNEL_FULL_DUPLEX) 1719 + if (chip_info->duplex != SSP_MICROWIRE_CHANNEL_FULL_DUPLEX) { 1720 1720 dev_err(&pl022->adev->dev, 1721 1721 "Microwire half duplex mode requested," 1722 1722 " but this is only available in the" 1723 1723 " ST version of PL022\n"); 1724 - return -EINVAL; 1724 + return -EINVAL; 1725 + } 1725 1726 } 1726 1727 } 1727 1728 return 0;