]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen-gntalloc: signedness bug in add_grefs()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 4 Nov 2011 18:24:36 +0000 (21:24 +0300)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 15 Nov 2011 16:09:58 +0000 (11:09 -0500)
commite49871a9976ee01f6df1f562c4785587ae319dc9
treef6fc8f341108ce4dc41be1f9f2d2c2d0fd0660fd
parentb63522c84f023215ad4f8166da31b1fbf87744a1
xen-gntalloc: signedness bug in add_grefs()

gref->gref_id is unsigned so the error handling didn't work.
gnttab_grant_foreign_access() returns an int type, so we can add a
cast here, and it doesn't cause any problems.
gnttab_grant_foreign_access() can return a variety of errors
including -ENOSPC, -ENOSYS and -ENOMEM.

CC: stable@kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/gntalloc.c