linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] omap2-mcspi: when overriding spi settings, don't clobber IO error on calling omap2_mcspi_setup_transfer
@ 2014-10-31 15:40 Dave Bender
  0 siblings, 0 replies; only message in thread
From: Dave Bender @ 2014-10-31 15:40 UTC (permalink / raw)
  To: linux-arm-kernel

Observed errors using spidev (erroneously on the userspace I may add)
and traced it to a bug in omap2-mcspi.c clobbering the status:

diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index d7e52c2..4fda762 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1153,8 +1153,10 @@ static void omap2_mcspi_work(struct omap2_mcspi
*mcspi, struct spi_message *m)
  }
  /* Restore defaults if they were overriden */
  if (par_override) {
+ int status_transfer;
  par_override = 0;
- status = omap2_mcspi_setup_transfer(spi, NULL);
+ status_transfer = omap2_mcspi_setup_transfer(spi, NULL);
+ status = status ? status : status_transfer;
  }

  if (cs_active)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-31 15:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-31 15:40 [PATCH] omap2-mcspi: when overriding spi settings, don't clobber IO error on calling omap2_mcspi_setup_transfer Dave Bender

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).