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

Commit 23f48222 authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller
Browse files

tg3: clean up redundant initialization of tnapi



tnapi is being initialized and then immediately updated and
hence the initialiation is redundant.  Clean up the warning
by moving the declaration and initialization to the inside
of the for-loop.

Cleans up clang scan-build warning:
warning: Value stored to 'tnapi' during its initialization is never read

Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a5135676
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -11536,11 +11536,11 @@ static int tg3_start(struct tg3 *tp, bool reset_phy, bool test_irq,
	tg3_napi_enable(tp);

	for (i = 0; i < tp->irq_cnt; i++) {
		struct tg3_napi *tnapi = &tp->napi[i];
		err = tg3_request_irq(tp, i);
		if (err) {
			for (i--; i >= 0; i--) {
				tnapi = &tp->napi[i];
				struct tg3_napi *tnapi = &tp->napi[i];

				free_irq(tnapi->irq_vec, tnapi);
			}
			goto out_napi_fini;