From: codehero@gmail.com (Dave Bender)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] omap2-mcspi: when overriding spi settings, don't clobber IO error on calling omap2_mcspi_setup_transfer
Date: Fri, 31 Oct 2014 11:40:40 -0400 [thread overview]
Message-ID: <CAETHaKrz9tPN-quM3iCisKuTPqK61GdS3zLgi3HMrieiZGMRgg@mail.gmail.com> (raw)
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)
reply other threads:[~2014-10-31 15:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAETHaKrz9tPN-quM3iCisKuTPqK61GdS3zLgi3HMrieiZGMRgg@mail.gmail.com \
--to=codehero@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).