From 345499b5bbfe02639371efc0030294de407666c8 Mon Sep 17 00:00:00 2001 From: stephendpmurphy Date: Tue, 27 Apr 2021 14:31:51 -0400 Subject: [PATCH] Adding unnecessary goto statements --- src/mcp342x.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/mcp342x.c b/src/mcp342x.c index 6161f7b..fd3d637 100644 --- a/src/mcp342x.c +++ b/src/mcp342x.c @@ -36,12 +36,10 @@ mcp342x_return_code_t mcp342x_sampleChannel(mcp342x_dev_t *dev, const mcp342x_ch if( (NULL == dev) || (NULL == dev->intf.read) || (NULL == dev->intf.write) || (NULL == dev->intf.delay_us) ) { ret = MCP342x_RET_NULL_PTR; - goto EXIT; } else if( ch >= MCP342x_CH__MAX__ ) { ret = MCP342x_RET_INV_PARAM; - goto EXIT; } if( MCP342x_RET_OK == ret ) { @@ -96,7 +94,6 @@ mcp342x_return_code_t mcp342x_sampleChannel(mcp342x_dev_t *dev, const mcp342x_ch dev->results[ch].voltage = dev->results[ch].outputCode * MCP342x_LSB_VAL; } -EXIT: // Return our return code from retrieving a channel sample return ret; } \ No newline at end of file