Skip to content

Commit 3bcfc0a

Browse files
mchetankumardavem330
authored andcommitted
net: wwan: iosm: remove reduandant check
Remove reduandant IP session id check since required checks are in place under caller. Signed-off-by: M Chetan Kumar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 856a5c9 commit 3bcfc0a

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

drivers/net/wwan/iosm/iosm_ipc_imem_ops.c

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,7 @@ int ipc_imem_sys_wwan_open(struct iosm_imem *ipc_imem, int if_id)
2424
return -EIO;
2525
}
2626

27-
/* check for the interafce id
28-
* if if_id 1 to 8 then create IP MUX channel sessions.
29-
* To start MUX session from 0 as network interface id would start
30-
* from 1 so map it to if_id = if_id - 1
31-
*/
32-
if (if_id >= IP_MUX_SESSION_START && if_id <= IP_MUX_SESSION_END)
33-
return ipc_mux_open_session(ipc_imem->mux, if_id - 1);
34-
35-
return -EINVAL;
27+
return ipc_mux_open_session(ipc_imem->mux, if_id - 1);
3628
}
3729

3830
/* Release a net link to CP. */
@@ -83,13 +75,8 @@ int ipc_imem_sys_wwan_transmit(struct iosm_imem *ipc_imem,
8375
goto out;
8476
}
8577

86-
if (if_id >= IP_MUX_SESSION_START && if_id <= IP_MUX_SESSION_END)
87-
/* Route the UL packet through IP MUX Layer */
88-
ret = ipc_mux_ul_trigger_encode(ipc_imem->mux,
89-
if_id - 1, skb);
90-
else
91-
dev_err(ipc_imem->dev,
92-
"invalid if_id %d: ", if_id);
78+
/* Route the UL packet through IP MUX Layer */
79+
ret = ipc_mux_ul_trigger_encode(ipc_imem->mux, if_id - 1, skb);
9380
out:
9481
return ret;
9582
}

0 commit comments

Comments
 (0)