mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
qlcnic: silence false positive overflow warning
We actually store the MAC address as well as the board_name here. The longest board_name is 75 characters so there is more than enough room to hold the 17 character MAC and the ": " divider. But making this buffer larger silences a static checker warning. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-By: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7614fe8888
commit
7bc486460f
@ -1813,7 +1813,7 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
struct qlcnic_hardware_context *ahw;
|
||||
int err, pci_using_dac = -1;
|
||||
u32 capab2;
|
||||
char board_name[QLCNIC_MAX_BOARD_NAME_LEN];
|
||||
char board_name[QLCNIC_MAX_BOARD_NAME_LEN + 19]; /* MAC + ": " + name */
|
||||
|
||||
err = pci_enable_device(pdev);
|
||||
if (err)
|
||||
|
Loading…
Reference in New Issue
Block a user