Skip to content

Commit

Permalink
drm/via: vfree() no need checking before calling it
Browse files Browse the repository at this point in the history
vfree() does it's own NULL checking, no need for explicit check before
calling it.

Signed-off-by: Figo.zhang <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
  • Loading branch information
Figo1802 authored and airlied committed Jun 12, 2009
1 parent be25ed9 commit c5c0755
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/gpu/drm/via/via_dmablit.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,8 @@ via_free_sg_info(struct pci_dev *pdev, drm_via_sg_info_t *vsg)
default:
vsg->state = dr_via_sg_init;
}
if (vsg->bounce_buffer) {
vfree(vsg->bounce_buffer);
vsg->bounce_buffer = NULL;
}
vfree(vsg->bounce_buffer);
vsg->bounce_buffer = NULL;
vsg->free_on_sequence = 0;
}

Expand Down

0 comments on commit c5c0755

Please sign in to comment.