aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/mc/mc-request.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/mc/mc-request.c')
-rw-r--r--drivers/media/mc/mc-request.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/mc/mc-request.c b/drivers/media/mc/mc-request.c
index 2ac9ac0a740b..3cca9a0c7c97 100644
--- a/drivers/media/mc/mc-request.c
+++ b/drivers/media/mc/mc-request.c
@@ -315,12 +315,12 @@ int media_request_alloc(struct media_device *mdev, int *alloc_fd)
fd_prepare_file(fdf)->private_data = req;
- *alloc_fd = fd_publish(fdf);
-
snprintf(req->debug_str, sizeof(req->debug_str), "%u:%d",
- atomic_inc_return(&mdev->request_id), *alloc_fd);
+ atomic_inc_return(&mdev->request_id), fd_prepare_fd(fdf));
dev_dbg(mdev->dev, "request: allocated %s\n", req->debug_str);
+ *alloc_fd = fd_publish(fdf);
+
return 0;
err_free_req: