From 63fa80cd582321693474f9cf9203329a2f8a8494 Mon Sep 17 00:00:00 2001 From: Christian Engelmayer Date: Tue, 13 May 2014 22:47:03 +0200 Subject: [PATCH] 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: Christian Engelmayer Signed-off-by: Greg Kroah-Hartman --- drivers/misc/genwqe/card_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/genwqe/card_utils.c b/drivers/misc/genwqe/card_utils.c index d049d271699c..5babf4013f4b 100644 --- a/drivers/misc/genwqe/card_utils.c +++ b/drivers/misc/genwqe/card_utils.c @@ -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) { -- 2.20.1