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>
This commit is contained in:
Thomas Perrot 2021-10-22 16:21:04 +02:00 committed by Mark Brown
parent f09f6dfef8
commit d81d0e41ed
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -1716,12 +1716,13 @@ static int verify_controller_parameters(struct pl022 *pl022,
return -EINVAL; return -EINVAL;
} }
} else { } else {
if (chip_info->duplex != SSP_MICROWIRE_CHANNEL_FULL_DUPLEX) if (chip_info->duplex != SSP_MICROWIRE_CHANNEL_FULL_DUPLEX) {
dev_err(&pl022->adev->dev, dev_err(&pl022->adev->dev,
"Microwire half duplex mode requested," "Microwire half duplex mode requested,"
" but this is only available in the" " but this is only available in the"
" ST version of PL022\n"); " ST version of PL022\n");
return -EINVAL; return -EINVAL;
}
} }
} }
return 0; return 0;