git.graph-it.com
/
graphit
/
unipi-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f046ec
)
Added missing return code to neuron_spi_send_message
author
Tom Knot
<tomasknot@gmail.com>
Mon, 16 Apr 2018 10:43:36 +0000
(12:43 +0200)
committer
Tom Knot
<tomasknot@gmail.com>
Mon, 16 Apr 2018 10:43:36 +0000
(12:43 +0200)
modules/unipi/src/unipi_spi.c
patch
|
blob
|
history
diff --git
a/modules/unipi/src/unipi_spi.c
b/modules/unipi/src/unipi_spi.c
index 6fc873ff82b34009f754e74cf1dc27e17205a4ad..1311f69d8b5b569447115c6fa405a6ee199f86bd 100644
(file)
--- a/
modules/unipi/src/unipi_spi.c
+++ b/
modules/unipi/src/unipi_spi.c
@@
-670,6
+670,7
@@
static s32 neuronspi_spi_watchdog(void *data)
int neuronspi_spi_send_message(struct spi_device* spi_dev, u8 *send_buf, u8 *recv_buf, s32 len, s32 freq, s32 delay, s32 send_header)
{
s32 i = 0;
+ int ret_code = 0;
u16 recv_crc1 = 0;
u16 recv_crc2 = 0;
u16 packet_crc = 0;
@@
-790,11
+791,13
@@
int neuronspi_spi_send_message(struct spi_device* spi_dev, u8 *send_buf, u8 *rec
printk(KERN_INFO "NEURONSPI: SPI CRC2 Not Correct");
#endif
recv_buf[0] = 0;
+ ret_code = 1;
}
}
mutex_unlock(&neuronspi_master_mutex);
kfree(s_trans);
+ return ret_code;
}