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

Commit 899e1b2f authored by Linyu Yuan's avatar Linyu Yuan
Browse files

usb: misc: nb7vpq904m: fix possible array overflow



Array 'eq' of size 2 may use index value(s) 2.

Change-Id: I69f8a0992a26cc7dabed35d734cf046e9bd42408
Signed-off-by: default avatarLinyu Yuan <linyyuan@codeaurora.org>
parent f2905d39
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 */

#include <linux/module.h>
@@ -85,9 +85,11 @@ enum operation_mode {
enum channel_mode {
	CHAN_MODE_USB,
	CHAN_MODE_DP,
	CHAN_MODE_NUM,
	/* update CHAN_MODE_NUM if new mode is added */
};

#define CHAN_MODE_NUM	2

/**
 * struct ssusb_redriver - representation of USB re-driver
 * @dev: struct device pointer