From c58dd162715f66cf64a32c83f34314cb8260d8f8 Mon Sep 17 00:00:00 2001 From: Tom Knot Date: Mon, 16 Apr 2018 12:43:36 +0200 Subject: [PATCH] Added missing return code to neuron_spi_send_message --- modules/unipi/src/unipi_spi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/unipi/src/unipi_spi.c b/modules/unipi/src/unipi_spi.c index 6fc873f..1311f69 100644 --- 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; } -- 2.34.1