From 3da17c84d6dcdb0357aa1f2fa175b86af1cef28e Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Tue, 19 Apr 2011 19:57:42 +0300 Subject: [PATCH] gpu: pvr: fix missing return value warning when CONFIG_BUG=n Although the behaviour after these functions return in a BUG() condition is undefined, we could still make things somewhat more predictable by returning the same value every time. Also this way we get rid of the warning. Signed-off-by: Imre Deak --- pvr/pvr_debugfs.c | 2 ++ pvr/sysconfig.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pvr/pvr_debugfs.c b/pvr/pvr_debugfs.c index 9636d02..32ca6c3 100644 --- a/pvr/pvr_debugfs.c +++ b/pvr/pvr_debugfs.c @@ -109,6 +109,8 @@ static int pvr_debugfs_reset_wrapper(void *data, u64 val) return pvr_debugfs_reset(data, val); BUG(); + + return -EFAULT; } DEFINE_SIMPLE_ATTRIBUTE(pvr_debugfs_reset_fops, NULL, diff --git a/pvr/sysconfig.c b/pvr/sysconfig.c index 94f18f6..2a31b70 100644 --- a/pvr/sysconfig.c +++ b/pvr/sysconfig.c @@ -160,6 +160,8 @@ unsigned long sgx_get_max_freq(void) } } BUG(); + + return 0; } #else -- 2.39.2