diff options
author | kbuild test robot <fengguang.wu@intel.com> | 2015-03-27 19:26:35 +0800 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-03-27 14:49:03 +0100 |
commit | 2f2cf68261acc4c5356dd07e8a8966612ae5a0d4 (patch) | |
tree | c5a3451c1609fae84d7a0560f25d4a0efe3c8240 /drivers/gpu/drm/i915 | |
parent | 5bedeb2de2127b3b80b40d977a17fe4fce83fe25 (diff) | |
download | linux-2f2cf68261acc4c5356dd07e8a8966612ae5a0d4.tar.bz2 |
drm/i915: fix simple_return.cocci warnings
drivers/gpu/drm/i915/i915_gem_gtt.c:1349:1-4: WARNING: end returns can be simpified and declaration on line 1347 can be dropped
Simplify a trivial if-return sequence. Possibly combine with a
preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci
CC: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_gtt.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index e33b1214c4d8..e82cec2c714e 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -1349,13 +1349,7 @@ err_out: static int gen6_ppgtt_alloc(struct i915_hw_ppgtt *ppgtt) { - int ret; - - ret = gen6_ppgtt_allocate_page_directories(ppgtt); - if (ret) - return ret; - - return 0; + return gen6_ppgtt_allocate_page_directories(ppgtt); } static void gen6_scratch_va_range(struct i915_hw_ppgtt *ppgtt, |