Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b85bfc44 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

spi: st-ssc4: Remove duplicate code to test unsupported mode bits



spi_setup() will test unsupported mode bits before calling spi->master->setup.
Thus remove duplicate code to test unsupported mode bits in spi_st_setup().

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f5bac70f
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -217,12 +217,6 @@ static int spi_st_setup(struct spi_device *spi)
	int cs = spi->cs_gpio;
	int ret;

	if (spi->mode & ~MODEBITS) {
		dev_err(&spi->dev, "unsupported mode bits 0x%x\n",
			spi->mode & ~MODEBITS);
		return -EINVAL;
	}

	if (!hz)  {
		dev_err(&spi->dev, "max_speed_hz unspecified\n");
		return -EINVAL;