File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -1352,7 +1352,6 @@ static int privcmd_ioeventfd_assign(struct privcmd_ioeventfd *ioeventfd)
1352
1352
struct privcmd_kernel_ioeventfd * kioeventfd ;
1353
1353
struct privcmd_kernel_ioreq * kioreq ;
1354
1354
unsigned long flags ;
1355
- struct fd f ;
1356
1355
int ret ;
1357
1356
1358
1357
/* Check for range overflow */
@@ -1372,15 +1371,7 @@ static int privcmd_ioeventfd_assign(struct privcmd_ioeventfd *ioeventfd)
1372
1371
if (!kioeventfd )
1373
1372
return - ENOMEM ;
1374
1373
1375
- f = fdget (ioeventfd -> event_fd );
1376
- if (!fd_file (f )) {
1377
- ret = - EBADF ;
1378
- goto error_kfree ;
1379
- }
1380
-
1381
- kioeventfd -> eventfd = eventfd_ctx_fileget (fd_file (f ));
1382
- fdput (f );
1383
-
1374
+ kioeventfd -> eventfd = eventfd_ctx_fdget (ioeventfd -> event_fd );
1384
1375
if (IS_ERR (kioeventfd -> eventfd )) {
1385
1376
ret = PTR_ERR (kioeventfd -> eventfd );
1386
1377
goto error_kfree ;
You can’t perform that action at this time.
0 commit comments