forked from Minki/linux
Staging: crystalhd: don't waste the last char of buffer
pinfo->name is a 32 char buffer. In the original code, the last char wasn't fully utilized. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
a3b6ff0352
commit
e278913c3c
@ -562,7 +562,7 @@ static int __devinit chd_dec_pci_probe(struct pci_dev *pdev,
|
||||
return rc;
|
||||
}
|
||||
|
||||
snprintf(pinfo->name, 31, "crystalhd_pci_e:%d:%d:%d",
|
||||
snprintf(pinfo->name, sizeof(pinfo->name), "crystalhd_pci_e:%d:%d:%d",
|
||||
pdev->bus->number, PCI_SLOT(pdev->devfn),
|
||||
PCI_FUNC(pdev->devfn));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user