From: Tom Knot Date: Mon, 16 Apr 2018 10:43:36 +0000 (+0200) Subject: Added missing return code to neuron_spi_send_message X-Git-Url: http://git.graph-it.com/?a=commitdiff_plain;h=c58dd162715f66cf64a32c83f34314cb8260d8f8;p=graphit%2Funipi-kernel.git Added missing return code to neuron_spi_send_message --- 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; }