Message ID | 1253952962.3897.2.camel@ht.satnam (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index d3fff9e..a59ddd1 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c @@ -513,13 +513,8 @@ struct file *ib_uverbs_alloc_event_file(struct ib_uverbs_file *uverbs_file, goto err; } - /* - * fops_get() can't fail here, because we're coming from a - * system call on a uverbs file, which will already have a - * module reference. - */ filp = alloc_file(uverbs_event_mnt, dget(uverbs_event_mnt->mnt_root), - FMODE_READ, fops_get(&uverbs_event_fops)); + FMODE_READ, &uverbs_event_fops); if (!filp) { ret = -ENFILE; goto err_fd;
fops_get is useless as 'uverbs_event_fops' will always be 'true'. This also fix compilation warning : CC [M] drivers/infiniband/core/uverbs_main.o drivers/infiniband/core/uverbs_main.c: In function ‘ib_uverbs_alloc_event_file’: drivers/infiniband/core/uverbs_main.c:522: warning: the address of ‘uverbs_event_fops’ will always evaluate as ‘true’ Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Cc: Roland Dreier <rolandd@cisco.com> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> --- drivers/infiniband/core/uverbs_main.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-)