gpu: pvr: fix missing return value warning when CONFIG_BUG=n
authorImre Deak <imre.deak@nokia.com>
Tue, 19 Apr 2011 16:57:42 +0000 (19:57 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 20 May 2012 18:43:05 +0000 (21:43 +0300)
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 <imre.deak@nokia.com>
pvr/pvr_debugfs.c
pvr/sysconfig.c

index 9636d02..32ca6c3 100644 (file)
@@ -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,
index 94f18f6..2a31b70 100644 (file)
@@ -160,6 +160,8 @@ unsigned long sgx_get_max_freq(void)
                }
        }
        BUG();
+
+       return 0;
 }
 
 #else