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

Commit 48c6a40e authored by Alexandra Winter's avatar Alexandra Winter Committed by Greg Kroah-Hartman
Browse files

s390/lcs: fix variable dereferenced before check



[ Upstream commit 671bb35c8e746439f0ed70815968f9a4f20a8deb ]

smatch complains about
drivers/s390/net/lcs.c:1741 lcs_get_control() warn: variable dereferenced before check 'card->dev' (see line 1739)

Fixes: 27eb5ac8 ("[PATCH] s390: lcs driver bug fixes and improvements [1/2]")
Signed-off-by: default avatarAlexandra Winter <wintera@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 467ddbbe
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1735,10 +1735,11 @@ lcs_get_control(struct lcs_card *card, struct lcs_cmd *cmd)
			lcs_schedule_recovery(card);
			break;
		case LCS_CMD_STOPLAN:
			if (card->dev) {
				pr_warn("Stoplan for %s initiated by LGW\n",
					card->dev->name);
			if (card->dev)
				netif_carrier_off(card->dev);
			}
			break;
		default:
			LCS_DBF_TEXT(5, trace, "noLGWcmd");