From: Pan Bian Date: Sat, 3 Dec 2016 12:39:33 +0000 (-0200) Subject: [media] media: platform: sti: return -ENOMEM on errors X-Git-Tag: v4.11-rc2~21^2~78 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d54a90c4c19307986effa50a93e47d1df7a132a6;p=platform%2Fkernel%2Flinux-exynos.git [media] media: platform: sti: return -ENOMEM on errors 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/sti/bdisp/bdisp-debug.c b/drivers/media/platform/sti/bdisp/bdisp-debug.c index 79c5635..7af6686 100644 --- a/drivers/media/platform/sti/bdisp/bdisp-debug.c +++ b/drivers/media/platform/sti/bdisp/bdisp-debug.c @@ -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)