On Wed 06-05-15 12:46:42, Vlastimil Babka wrote:
> On 05/06/2015 09:28 AM, Jan Kara wrote:
> >Convert omap_vout_uservirt_to_phys() to use get_vaddr_pfns() instead of
> >hand made mapping of virtual address to physical address. Also the
> >function leaked page reference from get_user_pages() so fix that by
> >properly release the reference when omap_vout_buffer_release() is
> >called.
> >
> >Signed-off-by: Jan Kara <j...@suse.cz>
> >---
> >  drivers/media/platform/omap/omap_vout.c | 67 
> > +++++++++++++++------------------
> >  1 file changed, 31 insertions(+), 36 deletions(-)
> >
> 
> ...
> 
> >+    vec = frame_vector_create(1);
> >+    if (!vec)
> >+            return -ENOMEM;
> >
> >-            if (res == nr_pages) {
> >-                    physp =  __pa(page_address(&pages[0]) +
> >-                                    (virtp & ~PAGE_MASK));
> >-            } else {
> >-                    printk(KERN_WARNING VOUT_NAME
> >-                                    "get_user_pages failed\n");
> >-                    return 0;
> >-            }
> >+    ret = get_vaddr_frames(virtp, 1, 1, 0, vec);
> 
> Use true/false where appropriate.
  Right. Thanks.

                                                                Honza
-- 
Jan Kara <j...@suse.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to