]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
scsi: target: tcmu: Fix warning: 'page' may be used uninitialized
authorJohn Donnelly <john.p.donnelly@oracle.com>
Thu, 24 Sep 2020 00:19:20 +0000 (17:19 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:11:34 +0000 (10:11 +0100)
[ Upstream commit 61741d8699e1fc764a309ebd20211bb1cb193110 ]

Corrects drivers/target/target_core_user.c:688:6: warning: 'page' may be
used uninitialized.

Link: https://lore.kernel.org/r/20200924001920.43594-1-john.p.donnelly@oracle.com
Fixes: 3c58f737231e ("scsi: target: tcmu: Optimize use of flush_dcache_page")
Cc: Mike Christie <michael.christie@oracle.com>
Acked-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: John Donnelly <john.p.donnelly@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/target/target_core_user.c

index 9b75923505020534a878aa32fc3eafc034ac7776..86b28117787ec15c29535ddc6d31d8ade98ff6a3 100644 (file)
@@ -681,7 +681,7 @@ static void scatter_data_area(struct tcmu_dev *udev,
        void *from, *to = NULL;
        size_t copy_bytes, to_offset, offset;
        struct scatterlist *sg;
-       struct page *page;
+       struct page *page = NULL;
 
        for_each_sg(data_sg, sg, data_nents, i) {
                int sg_remaining = sg->length;