diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2009-09-03 08:27:08 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-09-12 10:35:30 -0400 |
commit | e71044ee2efa4792e21d243b03d49006db66aec9 (patch) | |
tree | 56a673a82d0d5f4fe8308a858a2958600b091ba9 /drivers/scsi | |
parent | b437b95620dbf4bf7bd13af0f9d32fdac82c5d37 (diff) |
[SCSI] sg: fix oops in the error path in sg_build_indirect()
When the allocation fails in sg_build_indirect(), an oops happens in
the error path. It's caused by an obvious typo.
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Reported-by: Bob Tracy <rct@gherkin.frus.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/sg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 9230402c45af..4968c4ced385 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -1811,7 +1811,7 @@ retry: | |||
1811 | return 0; | 1811 | return 0; |
1812 | out: | 1812 | out: |
1813 | for (i = 0; i < k; i++) | 1813 | for (i = 0; i < k; i++) |
1814 | __free_pages(schp->pages[k], order); | 1814 | __free_pages(schp->pages[i], order); |
1815 | 1815 | ||
1816 | if (--order >= 0) | 1816 | if (--order >= 0) |
1817 | goto retry; | 1817 | goto retry; |