diff options
| author | Will Huang <wilhuang@codeaurora.org> | 2017-06-29 10:40:47 +0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-06-29 02:00:11 -0700 |
| commit | 3d22edeea6de72df4eaace12babe5f97a7bc2170 (patch) | |
| tree | 9687a5cb863e028b9dfbdeab40ee48dd41d409d3 | |
| parent | 7d20ee86825811602b67d9d0ce0c7a155a1116bd (diff) | |
qcacmn: Fix compile issue when fix sdio static analyze issues
INVALID_MAILBOX_NUMBER is not defined in head file and used cross
source files. When adding pointer check in function
__hif_read_write, ret value will be left as uninitialized.
Move INVALID_MAILBOX_NUMBER to head file and initialize ret value.
Change-Id: Ia021fb2a81e7efac9ad62a08edc3e0788c7a963d
CRs-Fixed: 2068905
| -rw-r--r-- | hif/src/sdio/hif_sdio_dev.c | 1 | ||||
| -rw-r--r-- | hif/src/sdio/hif_sdio_internal.h | 2 | ||||
| -rw-r--r-- | hif/src/sdio/hif_sdio_send.c | 1 | ||||
| -rw-r--r-- | hif/src/sdio/native_sdio/src/hif.c | 4 |
4 files changed, 5 insertions, 3 deletions
diff --git a/hif/src/sdio/hif_sdio_dev.c b/hif/src/sdio/hif_sdio_dev.c index 3662e4182aaa..0bad5cdc7542 100644 --- a/hif/src/sdio/hif_sdio_dev.c +++ b/hif/src/sdio/hif_sdio_dev.c @@ -62,7 +62,6 @@ * we also need 2 mbox support just as PCIe LL cases. */ -#define INVALID_MAILBOX_NUMBER 0xFF /** * hif_dev_map_pipe_to_mail_box() - maps pipe id to mailbox. * @pdev: sdio device context diff --git a/hif/src/sdio/hif_sdio_internal.h b/hif/src/sdio/hif_sdio_internal.h index 4aa3684440e5..d90a7175b006 100644 --- a/hif/src/sdio/hif_sdio_internal.h +++ b/hif/src/sdio/hif_sdio_internal.h @@ -34,6 +34,8 @@ #include "htc_api.h" #include "hif_internal.h" +#define INVALID_MAILBOX_NUMBER 0xFF + #define HIF_SDIO_RX_BUFFER_SIZE 1792 #define HIF_SDIO_RX_DATA_OFFSET 64 diff --git a/hif/src/sdio/hif_sdio_send.c b/hif/src/sdio/hif_sdio_send.c index f84053d9187c..cd0ab2985c87 100644 --- a/hif/src/sdio/hif_sdio_send.c +++ b/hif/src/sdio/hif_sdio_send.c @@ -25,6 +25,7 @@ * to the Linux Foundation. */ +#define ATH_MODULE_NAME hif #include <qdf_types.h> #include <qdf_status.h> #include <qdf_timer.h> diff --git a/hif/src/sdio/native_sdio/src/hif.c b/hif/src/sdio/native_sdio/src/hif.c index ad90fa4342e1..5e9161d3b980 100644 --- a/hif/src/sdio/native_sdio/src/hif.c +++ b/hif/src/sdio/native_sdio/src/hif.c @@ -356,7 +356,7 @@ __hif_read_write(struct hif_sdio_dev *device, { uint8_t opcode; QDF_STATUS status = QDF_STATUS_SUCCESS; - int ret; + int ret = A_OK; uint8_t *tbuffer; bool bounced = false; @@ -558,7 +558,7 @@ __hif_read_write(struct hif_sdio_dev *device, ("%s: Invalid direction: 0x%08x\n", __func__, request)); status = QDF_STATUS_E_INVAL; - break; + return status; } if (ret) { |
