浏览代码

[media] netup_unidvb: Remove a useless memset

This memory is allocated using kzalloc so there is no need to call
memset(..., 0, ...)

[mchehab@osg.samsung.com: as suggested by Joe Perches,
 It's unusual to not see the alloc above the if, removed a
 blank line between kzalloc/if and added a blank line after if]
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Christophe JAILLET 9 年之前
父节点
当前提交
df47512d59
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      drivers/media/pci/netup_unidvb/netup_unidvb_core.c

+ 1 - 2
drivers/media/pci/netup_unidvb/netup_unidvb_core.c

@@ -771,10 +771,9 @@ static int netup_unidvb_initdev(struct pci_dev *pci_dev,
 
 
 	/* allocate device context */
 	/* allocate device context */
 	ndev = kzalloc(sizeof(*ndev), GFP_KERNEL);
 	ndev = kzalloc(sizeof(*ndev), GFP_KERNEL);
-
 	if (!ndev)
 	if (!ndev)
 		goto dev_alloc_err;
 		goto dev_alloc_err;
-	memset(ndev, 0, sizeof(*ndev));
+
 	ndev->old_fw = old_firmware;
 	ndev->old_fw = old_firmware;
 	ndev->wq = create_singlethread_workqueue(NETUP_UNIDVB_NAME);
 	ndev->wq = create_singlethread_workqueue(NETUP_UNIDVB_NAME);
 	if (!ndev->wq) {
 	if (!ndev->wq) {