提交 8e57c586 编写于 作者: M Markus Elfring 提交者: Ingo Molnar

perf/x86/intel/uncore: Delete an unnecessary check before pci_dev_put() call

The pci_dev_put() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.
Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/54D0B59C.2060106@users.sourceforge.netSigned-off-by: NIngo Molnar <mingo@kernel.org>
上级 a6673429
...@@ -1132,8 +1132,7 @@ static int snbep_pci2phy_map_init(int devid) ...@@ -1132,8 +1132,7 @@ static int snbep_pci2phy_map_init(int devid)
} }
} }
if (ubox_dev) pci_dev_put(ubox_dev);
pci_dev_put(ubox_dev);
return err ? pcibios_err_to_errno(err) : 0; return err ? pcibios_err_to_errno(err) : 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册