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
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>
  • Loading branch information
John Donnelly authored and Martin K. Petersen committed Oct 3, 2020
1 parent 1dfbed1 commit 61741d8
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 @@ -699,7 +699,7 @@ static void scatter_data_area(struct tcmu_dev *udev, struct tcmu_cmd *tcmu_cmd,
void *from, *to = NULL;
size_t copy_bytes, offset;
struct scatterlist *sg;
struct page *page;
struct page *page = NULL;

for_each_sg(se_cmd->t_data_sg, sg, se_cmd->t_data_nents, i) {
int sg_remaining = sg->length;
Expand Down

0 comments on commit 61741d8

Please sign in to comment.