Commit 8d096e8c authored by Michal Schmidt's avatar Michal Schmidt Committed by James Bottomley

[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: default avatarMichal Schmidt <mschmidt@redhat.com>
Reported-by: default avatarBob Tracy <rct@gherkin.frus.com>
Acked-by: default avatarDouglas Gilbert <dgilbert@interlog.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 5e253fb3
......@@ -1811,7 +1811,7 @@ retry:
return 0;
out:
for (i = 0; i < k; i++)
__free_pages(schp->pages[k], order);
__free_pages(schp->pages[i], order);
if (--order >= 0)
goto retry;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment