Skip to content

Commit

Permalink
scsi: target: tcmu: Fix warning: 'page' may be used uninitialized
Browse files Browse the repository at this point in the history
[ Upstream commit 61741d8 ]

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: 3c58f73 ("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>
  • Loading branch information
jpdonnell authored and gregkh committed Oct 29, 2020
1 parent 2fb431e commit 9899e57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/target/target_core_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,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;
Expand Down

0 comments on commit 9899e57

Please sign in to comment.