mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
Merge branch 'akpm' (patches from Andrew)
Merge third patchbomb from Andrew Morton: - the rest of MM - scripts/gdb updates - ipc/ updates - lib/ updates - MAINTAINERS updates - various other misc things * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (67 commits) genalloc: rename of_get_named_gen_pool() to of_gen_pool_get() genalloc: rename dev_get_gen_pool() to gen_pool_get() x86: opt into HAVE_COPY_THREAD_TLS, for both 32-bit and 64-bit MAINTAINERS: add zpool MAINTAINERS: BCACHE: Kent Overstreet has changed email address MAINTAINERS: move Jens Osterkamp to CREDITS MAINTAINERS: remove unused nbd.h pattern MAINTAINERS: update brcm gpio filename pattern MAINTAINERS: update brcm dts pattern MAINTAINERS: update sound soc intel patterns MAINTAINERS: remove website for paride MAINTAINERS: update Emulex ocrdma email addresses bcache: use kvfree() in various places libcxgbi: use kvfree() in cxgbi_free_big_mem() target: use kvfree() in session alloc and free IB/ehca: use kvfree() in ipz_queue_{cd}tor() drm/nouveau/gem: use kvfree() in u_free() drm: use kvfree() in drm_free_large() cxgb4: use kvfree() in t4_free_mem() cxgb3: use kvfree() in cxgb_free_mem() ...
This commit is contained in:
@@ -48,18 +48,21 @@ static void *seq_buf_alloc(unsigned long size)
|
||||
* ERR_PTR(error). In the end of sequence they return %NULL. ->show()
|
||||
* returns 0 in case of success and negative number in case of error.
|
||||
* Returning SEQ_SKIP means "discard this element and move on".
|
||||
* Note: seq_open() will allocate a struct seq_file and store its
|
||||
* pointer in @file->private_data. This pointer should not be modified.
|
||||
*/
|
||||
int seq_open(struct file *file, const struct seq_operations *op)
|
||||
{
|
||||
struct seq_file *p = file->private_data;
|
||||
struct seq_file *p;
|
||||
|
||||
WARN_ON(file->private_data);
|
||||
|
||||
p = kzalloc(sizeof(*p), GFP_KERNEL);
|
||||
if (!p)
|
||||
return -ENOMEM;
|
||||
|
||||
file->private_data = p;
|
||||
|
||||
if (!p) {
|
||||
p = kmalloc(sizeof(*p), GFP_KERNEL);
|
||||
if (!p)
|
||||
return -ENOMEM;
|
||||
file->private_data = p;
|
||||
}
|
||||
memset(p, 0, sizeof(*p));
|
||||
mutex_init(&p->lock);
|
||||
p->op = op;
|
||||
#ifdef CONFIG_USER_NS
|
||||
|
Reference in New Issue
Block a user