Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fca540ab authored by Stefan Weil's avatar Stefan Weil Committed by David S. Miller
Browse files

enc28j60: Fix reading of transmit status vector



This error was reported by cppcheck:
drivers/net/enc28j60.c:815: error: Using sizeof for array given as function argument returns the size of pointer.

The original code reads 4 or 8 bytes instead of TSV_SIZE (= 100) bytes.
I just fixed the code, but did not run any tests.

Signed-off-by: default avatarStefan Weil <weil@mail.berlios.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bf36076a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -812,7 +812,7 @@ static void enc28j60_read_tsv(struct enc28j60_net *priv, u8 tsv[TSV_SIZE])
	if (netif_msg_hw(priv))
		printk(KERN_DEBUG DRV_NAME ": reading TSV at addr:0x%04x\n",
			 endptr + 1);
	enc28j60_mem_read(priv, endptr + 1, sizeof(tsv), tsv);
	enc28j60_mem_read(priv, endptr + 1, TSV_SIZE, tsv);
}

static void enc28j60_dump_tsv(struct enc28j60_net *priv, const char *msg,