]> www.infradead.org Git - users/willy/xarray.git/commitdiff
spi: spl022: fix Microwire full duplex mode
authorThomas Perrot <thomas.perrot@bootlin.com>
Fri, 22 Oct 2021 14:21:04 +0000 (16:21 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 26 Oct 2021 10:53:57 +0000 (11:53 +0100)
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>
drivers/spi/spi-pl022.c

index feebda66f56eba5bac3835589abeaa9248adb7e0..e4484ace584e4611efe781370b98665448651008 100644 (file)
@@ -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;