Commit 7b944cd9 authored by Federico Vaga's avatar Federico Vaga

apply cppcheck suggestion

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 768a1d3f
......@@ -39,9 +39,11 @@ static int gpio_readl(struct fd_dev *fd, int reg)
static int gpio_writel_with_retry(struct fd_dev *fd, int val, int reg)
{
int retries = SPI_RETRIES, rv;
int retries = SPI_RETRIES;
while(retries--)
{
int rv;
gpio_writel(fd, val, reg);
rv = gpio_readl(fd, reg);
if(rv >= 0 && (rv == val))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment