瀏覽代碼

drm/via: vfree() no need checking before calling it

vfree() does it's own NULL checking, no need for explicit check before
calling it.

Signed-off-by: Figo.zhang <figo1802@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Figo.zhang 16 年之前
父節點
當前提交
c5c07550d4
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      drivers/gpu/drm/via/via_dmablit.c

+ 2 - 4
drivers/gpu/drm/via/via_dmablit.c

@@ -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;
 }