From: Imre Deak Date: Tue, 19 Apr 2011 16:57:42 +0000 (+0300) Subject: gpu: pvr: fix missing return value warning when CONFIG_BUG=n X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3da17c84d6dcdb0357aa1f2fa175b86af1cef28e;p=sgx.git 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 --- 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