summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2013-10-11 12:41:13 +1100
committerpx4dev <px4@purgatory.org>2013-10-10 21:32:31 -0700
commit53bd63f36d32fbbab3b243676a91944957d5c137 (patch)
tree231dc314db97a3d25f1ca44176660906cc1dfd62
parentb64ca0c45402af9116fd4ad7cd98f607c9d3f936 (diff)
downloadpx4-nuttx-53bd63f36d32fbbab3b243676a91944957d5c137.tar.gz
px4-nuttx-53bd63f36d32fbbab3b243676a91944957d5c137.tar.bz2
px4-nuttx-53bd63f36d32fbbab3b243676a91944957d5c137.zip
sdio: fixed SDIO_DMAPREFLIGHT() macro to return fault code
the logical && was swallowing the -EFAULT return
-rw-r--r--nuttx/include/nuttx/sdio.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/nuttx/include/nuttx/sdio.h b/nuttx/include/nuttx/sdio.h
index 7406b8730..7fc3b8f7f 100644
--- a/nuttx/include/nuttx/sdio.h
+++ b/nuttx/include/nuttx/sdio.h
@@ -715,10 +715,9 @@
****************************************************************************/
#ifdef CONFIG_SDIO_DMA
-# define SDIO_DMAPREFLIGHT(dev,buffer,len) ((dev)->dmapreflight && \
- (dev)->dmapreflight(dev,buffer,len))
+# define SDIO_DMAPREFLIGHT(dev,buffer,len) ((dev)->dmapreflight?(dev)->dmapreflight(dev,buffer,len):OK)
#else
-# define SDIO_DMAPREFLIGHT(dev,buffer,len) (0)
+# define SDIO_DMAPREFLIGHT(dev,buffer,len) (OK)
#endif
/****************************************************************************