Commit 4ebf8816 authored by Jay Fang's avatar Jay Fang Committed by Mark Brown

spi: spidev: Remove redundant initialization of variable status

In spidev_read() and spidev_write(), the variable status is being
initialized with a value that is never read and it is being updated
later with a new value. The initialization is redundant and can be
removed.
Signed-off-by: default avatarJay Fang <f.fangjian@huawei.com>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/1599631704-53232-1-git-send-email-f.fangjian@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent b0b71a6f
......@@ -146,7 +146,7 @@ static ssize_t
spidev_read(struct file *filp, char __user *buf, size_t count, loff_t *f_pos)
{
struct spidev_data *spidev;
ssize_t status = 0;
ssize_t status;
/* chipselect only toggles at start or end of operation */
if (count > bufsiz)
......@@ -176,7 +176,7 @@ spidev_write(struct file *filp, const char __user *buf,
size_t count, loff_t *f_pos)
{
struct spidev_data *spidev;
ssize_t status = 0;
ssize_t status;
unsigned long missing;
/* chipselect only toggles at start or end of operation */
......
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