提交 63fa80cd 编写于 作者: C Christian Engelmayer 提交者: Greg Kroah-Hartman

misc: genwqe: fix uninitialized return value in genwqe_free_sync_sgl()

Function genwqe_free_sync_sgl() returns the value of variable 'rc'. 'rc' is
only set in the error paths, thus initialize it by 0. Coverity CID 1204242.
Signed-off-by: NChristian Engelmayer <cengelma@gmx.at>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f82dd4b0
......@@ -454,7 +454,7 @@ int genwqe_setup_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl,
*/
int genwqe_free_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl)
{
int rc;
int rc = 0;
struct pci_dev *pci_dev = cd->pci_dev;
if (sgl->fpage) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册