Skip to content

Commit

Permalink
drm/i915: fix simple_return.cocci warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kbuild test robot authored and Daniel Vetter committed Mar 27, 2015
1 parent 5bedeb2 commit 2f2cf68
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/gpu/drm/i915/i915_gem_gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1349,13 +1349,7 @@ static int gen6_ppgtt_allocate_page_directories(struct i915_hw_ppgtt *ppgtt)

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,
Expand Down

0 comments on commit 2f2cf68

Please sign in to comment.