fd_install() should be called only once all other initialization is
done and no errors can happen.
Bug
1589104
Change-Id: I822511a64d4c6fa59c8e772a896dbd6818459c97
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/706928
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
err = PTR_ERR(file);
goto clean_up;
}
- fd_install(fd, file);
err = __gk20a_channel_open(g, file);
if (err)
goto clean_up_file;
+ fd_install(fd, file);
args->channel_fd = fd;
return 0;
err = PTR_ERR(file);
goto clean_up;
}
- fd_install(fd, file);
err = gk20a_as_alloc_share(&g->as, args->big_page_size, &as_share);
if (err)
goto clean_up_file;
+ fd_install(fd, file);
file->private_data = as_share;
args->as_fd = fd;
err = PTR_ERR(file);
goto clean_up;
}
- fd_install(fd, file);
err = gk20a_tsg_open(g, file);
if (err)
goto clean_up_file;
+ fd_install(fd, file);
args->tsg_fd = fd;
return 0;