Skip to content

Commit

Permalink
[media] media: platform: sti: return -ENOMEM on errors
Browse files Browse the repository at this point in the history
Function bdisp_debugfs_create() returns 0 even on errors. So its caller
cannot detect the errors. It may be better to return "-ENOMEM" on the
exception paths.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188801

Signed-off-by: Pan Bian <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
SinkFinder authored and mchehab committed Feb 3, 2017
1 parent 4865fff commit d54a90c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/platform/sti/bdisp/bdisp-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ int bdisp_debugfs_create(struct bdisp_dev *bdisp)

err:
bdisp_debugfs_remove(bdisp);
return 0;
return -ENOMEM;
}

void bdisp_debugfs_remove(struct bdisp_dev *bdisp)
Expand Down

0 comments on commit d54a90c

Please sign in to comment.