Fix build error unused-but-set-variable in sr100

motorola/kernel/modules/drivers/uwb/sr100/sr100.c:656:7: error: variable
'retry_count' set but not used [-Werror,-Wunused-but-set-variable]
  int retry_count = 0;

Change-Id: Ied2b704e11f5ded4ca8125ad0176573f3aefc6d0
Signed-off-by: Srihari Sathyanarayana <sriharis@motorola.com>
Reviewed-on: https://gerrit.mot.com/2465217
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Qing Chang <qing@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
This commit is contained in:
Srihari Sathyanarayana 2022-12-08 18:52:41 +05:30
commit 7b65d3eff5

View file

@ -653,7 +653,6 @@ static ssize_t sr100_dev_read(struct file* filp, char* buf, size_t count,
loff_t* offset) {
struct sr100_dev* sr100_dev = filp->private_data;
int ret = -EIO;
int retry_count = 0;
memset(sr100_dev->rx_buffer, 0x00, SR100_RXBUF_SIZE);
if (!gpio_get_value(sr100_dev->irq_gpio)) {
if (filp->f_flags & O_NONBLOCK) {
@ -699,7 +698,6 @@ first_irq_wait:
ret = -1;
}
read_end:
retry_count = 0;
return ret;
}