Commit 7912fc99 authored by Jinpeng Cui's avatar Jinpeng Cui Committed by Marc Kleine-Budde

can: kvaser_pciefd: remove redundant variable ret

Return value directly from readl_poll_timeout() instead of
getting value from redundant variable ret.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarJinpeng Cui <cui.jinpeng2@zte.com.cn>
Link: https://lore.kernel.org/all/20220831150805.305106-1-cui.jinpeng2@zte.com.cnSigned-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 3a71eba6
......@@ -329,12 +329,9 @@ MODULE_DEVICE_TABLE(pci, kvaser_pciefd_id_table);
static int kvaser_pciefd_spi_wait_loop(struct kvaser_pciefd *pcie, int msk)
{
u32 res;
int ret;
ret = readl_poll_timeout(pcie->reg_base + KVASER_PCIEFD_SPI_STATUS_REG,
res, res & msk, 0, 10);
return ret;
return readl_poll_timeout(pcie->reg_base + KVASER_PCIEFD_SPI_STATUS_REG,
res, res & msk, 0, 10);
}
static int kvaser_pciefd_spi_cmd(struct kvaser_pciefd *pcie, const u8 *tx,
......
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