From: Al Viro <[email protected]>

Signed-off-by: Al Viro <[email protected]>
---
 drivers/usb/mon/mon_bin.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c
index cdc68e5..26d497b 100644
--- a/drivers/usb/mon/mon_bin.c
+++ b/drivers/usb/mon/mon_bin.c
@@ -1305,17 +1305,16 @@ static int mon_bin_wait_event(struct file *file, struct 
mon_reader_bin *rp)
 static int mon_alloc_buff(struct mon_pgmap *map, int npages)
 {
        int n;
-       unsigned long vaddr;
 
        for (n = 0; n < npages; n++) {
-               vaddr = (unsigned long)get_zeroed_page(GFP_KERNEL);
-               if (vaddr == 0) {
+               void *vaddr = get_zeroed_page(GFP_KERNEL);
+               if (!vaddr) {
                        while (n-- != 0)
                                free_page(map[n].ptr);
                        return -ENOMEM;
                }
-               map[n].ptr = (unsigned char *) vaddr;
-               map[n].pg = virt_to_page((void *) vaddr);
+               map[n].ptr = vaddr;
+               map[n].pg = virt_to_page(vaddr);
        }
        return 0;
 }
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to