Commit d328ddd2 authored by Devendra Naga's avatar Devendra Naga Committed by Greg Kroah-Hartman

staging: sm7xxfb: copy device name before we pass to the smtc_alloc_fb_info

the name is not initialised and passed to the function smtc_alloc_fb_info
and copies the name into a member of fb structure.

copy the name before calling alloc_fb_info.
Signed-off-by: default avatarDevendra Naga <devendra.aaru@gmail.com>
Acked-by: default avatarJavier Muñoz <jmunhoz@igalia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 147cd165
......@@ -798,6 +798,8 @@ static int __devinit smtcfb_pci_probe(struct pci_dev *pdev,
if (err)
return err;
sprintf(name, "sm%Xfb", ent->device);
sfb = smtc_alloc_fb_info(pdev, name);
if (!sfb) {
......@@ -806,7 +808,6 @@ static int __devinit smtcfb_pci_probe(struct pci_dev *pdev,
}
sfb->chip_id = ent->device;
sprintf(name, "sm%Xfb", sfb->chip_id);
pci_set_drvdata(pdev, sfb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment