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

Commit 9b648d78 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Kalle Valo
Browse files

rsi: eliminate superfluous NULL check



msg is dereferenced before checking against NULL, e.g.
when assigning pad_bytes.
Remove the superfluous check in function rsi_mgmt_pkt_to_core.

Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent d02fb8f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -398,7 +398,7 @@ static int rsi_mgmt_pkt_to_core(struct rsi_common *common,
			return -ENOLINK;

		msg_len -= pad_bytes;
		if ((msg_len <= 0) || (!msg)) {
		if (msg_len <= 0) {
			rsi_dbg(MGMT_RX_ZONE,
				"%s: Invalid rx msg of len = %d\n",
				__func__, msg_len);