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

Commit 27531fb8 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "u_rmnet_ctrl_qti: Add correct check for validating the port number"

parents 58f01e2d e2432c40
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ static int grmnet_ctrl_qti_send_cpkt_tomodem(u8 portno,
		return -EINVAL;
	}

	if (portno > NR_QTI_PORTS) {
	if (portno >= NR_QTI_PORTS) {
		pr_err("%s: Invalid QTI port %d\n", __func__, portno);
		return -ENODEV;
	}
@@ -140,7 +140,7 @@ gqti_ctrl_notify_modem(void *gptr, u8 portno, int val)
{
	struct rmnet_ctrl_qti_port *port;

	if (portno > NR_QTI_PORTS) {
	if (portno >= NR_QTI_PORTS) {
		pr_err("%s: Invalid QTI port %d\n", __func__, portno);
		return;
	}
@@ -158,7 +158,7 @@ int gqti_ctrl_connect(struct grmnet *gr, u8 port_num)
	unsigned long		flags;

	pr_debug("%s: grmnet:%p\n", __func__, gr);
	if (port_num > NR_QTI_PORTS) {
	if (port_num >= NR_QTI_PORTS) {
		pr_err("%s: Invalid QTI port %d\n", __func__, port_num);
		return -ENODEV;
	}
@@ -169,7 +169,7 @@ int gqti_ctrl_connect(struct grmnet *gr, u8 port_num)
		return -ENODEV;
	}

	if (port_num > NR_QTI_PORTS) {
	if (port_num >= NR_QTI_PORTS) {
		pr_err("%s: Invalid QTI port %d\n", __func__, port_num);
		return -ENODEV;
	}
@@ -203,7 +203,7 @@ void gqti_ctrl_disconnect(struct grmnet *gr, u8 port_num)
		return;
	}

	if (port_num > NR_QTI_PORTS) {
	if (port_num >= NR_QTI_PORTS) {
		pr_err("%s: Invalid QTI port %d\n", __func__, port_num);
		return;
	}