diff options
author | Kees Cook <keescook@chromium.org> | 2015-07-25 01:35:59 +0200 |
---|---|---|
committer | Jon Mason <jdmason@kudzu.us> | 2015-08-09 22:32:22 +0200 |
commit | e15f940908e474da03349cb55a107fe89310a02c (patch) | |
tree | 53817c8cc2af18a7bfcd8c93a419b772cf7a5b6f /drivers/ntb/ntb.c | |
parent | NTB: Fix dereference before check (diff) | |
download | linux-e15f940908e474da03349cb55a107fe89310a02c.tar.xz linux-e15f940908e474da03349cb55a107fe89310a02c.zip |
ntb: avoid format string in dev_set_name
Avoid any chance of format string expansion when calling dev_set_name.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers/ntb/ntb.c')
-rw-r--r-- | drivers/ntb/ntb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ntb/ntb.c b/drivers/ntb/ntb.c index 23435f2a5486..2e2530743831 100644 --- a/drivers/ntb/ntb.c +++ b/drivers/ntb/ntb.c @@ -114,7 +114,7 @@ int ntb_register_device(struct ntb_dev *ntb) ntb->dev.bus = &ntb_bus; ntb->dev.parent = &ntb->pdev->dev; ntb->dev.release = ntb_dev_release; - dev_set_name(&ntb->dev, pci_name(ntb->pdev)); + dev_set_name(&ntb->dev, "%s", pci_name(ntb->pdev)); ntb->ctx = NULL; ntb->ctx_ops = NULL; |