]> err.no Git - linux-2.6/blobdiff - drivers/ieee1394/raw1394.c
[PATCH] remove verify_area(): remove verify_area() from various uaccess.h headers
[linux-2.6] / drivers / ieee1394 / raw1394.c
index 7419af450bd119f7349fd1357978238a6535529b..b4fa14793fe5f1a421965c8ae550ef72f7ec926f 100644 (file)
@@ -98,7 +98,7 @@ static struct hpsb_address_ops arm_ops = {
 
 static void queue_complete_cb(struct pending_request *req);
 
-static struct pending_request *__alloc_pending_request(int flags)
+static struct pending_request *__alloc_pending_request(unsigned int __nocast flags)
 {
        struct pending_request *req;
 
@@ -2506,9 +2506,12 @@ static int raw1394_iso_send_packets(struct file_info *fi, void __user * uaddr)
        if (copy_from_user(&upackets, uaddr, sizeof(upackets)))
                return -EFAULT;
 
-       if (upackets.n_packets > hpsb_iso_n_ready(fi->iso_handle))
+       if (upackets.n_packets >= fi->iso_handle->buf_packets)
                return -EINVAL;
 
+       if (upackets.n_packets >= hpsb_iso_n_ready(fi->iso_handle))
+               return -EAGAIN;
+
        /* ensure user-supplied buffer is accessible and big enough */
        if (!access_ok(VERIFY_READ, upackets.infos,
                        upackets.n_packets *