public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: greg@kroah.com, mark.a.allyn@intel.com, linux-kernel@vger.kernel.org
Subject: [PATCH 08/12] sep: Use kzalloc when needed
Date: Wed, 24 Nov 2010 19:38:21 +0000	[thread overview]
Message-ID: <20101124193814.16425.9000.stgit@bob.linux.org.uk> (raw)
In-Reply-To: <20101124192136.16425.49994.stgit@bob.linux.org.uk>

From: Alan Cox <alan@linux.intel.com>

Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 drivers/staging/sep/sep_driver.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)


diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c
index f576285..ff9df36 100644
--- a/drivers/staging/sep/sep_driver.c
+++ b/drivers/staging/sep/sep_driver.c
@@ -3343,16 +3343,13 @@ static int __devinit sep_probe(struct pci_dev *pdev,
 	}
 
 	/* allocate the sep_device structure for this device */
-	sep_dev = kmalloc(sizeof(struct sep_device), GFP_ATOMIC);
+	sep_dev = kzalloc(sizeof(struct sep_device), GFP_ATOMIC);
 	if (sep_dev == NULL) {
 		dev_warn(&pdev->dev,
 			"can't kmalloc the sep_device structure\n");
 		return -ENOMEM;
 	}
 
-	/* zero out sep structure */
-	memset((void *)sep_dev, 0, sizeof(struct sep_device));
-
 	/*
 	 * we're going to use another variable for actually
 	 * working with the device; this way, if we have
@@ -3365,8 +3362,6 @@ static int __devinit sep_probe(struct pci_dev *pdev,
 
 	if (pdev->device == MRST_PCI_DEVICE_ID)
 		sep->mrst = 1;
-	else
-		sep->mrst = 0;
 
 	dev_dbg(&sep->pdev->dev, "PCI obtained, device being prepared\n");
 	dev_dbg(&sep->pdev->dev, "revision is %d\n", sep->pdev->revision);
@@ -3423,7 +3418,6 @@ static int __devinit sep_probe(struct pci_dev *pdev,
 			goto end_function_deallocate_sep_shared_area;
 		}
 	} else {
-
 		sep->rar_size = FAKE_RAR_SIZE;
 		sep->rar_addr = dma_alloc_coherent(NULL,
 			sep->rar_size, &sep->rar_bus, GFP_KERNEL);


  parent reply	other threads:[~2010-11-24 19:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-24 19:23 [PATCH 00/12] SEP cleanups Alan Cox
2010-11-24 19:33 ` [PATCH 01/12] sep: minimal fix for wrong include Alan Cox
2010-11-24 19:33 ` [PATCH 02/12] sep: handle the rar definition stuff in the header Alan Cox
2010-11-24 19:33 ` [PATCH 03/12] sep: handle the memrar stuff in the headers Alan Cox
2010-11-24 19:34 ` [PATCH 04/12] sep: netlink - what netlink Alan Cox
2010-11-24 19:34 ` [PATCH 05/12] sep: clean up caller_id function Alan Cox
2010-11-24 19:34 ` [PATCH 06/12] sep: Fix the kernel-doc in SEP Alan Cox
2010-11-24 19:38 ` [PATCH 07/12] sep: clean up some of the obvious sillies Alan Cox
2010-11-24 19:38 ` Alan Cox [this message]
2010-11-24 19:38 ` [PATCH 09/12] sep: Make SEP consistent Alan Cox
2010-11-24 19:38 ` [PATCH 10/12] sep: cant is an angular inclination Alan Cox
2010-11-24 19:39 ` [PATCH 11/12] sep: clean up a couple of spots missed in pass one Alan Cox
2010-11-24 19:39 ` [PATCH 12/12] sep: Fix crash if a device is not found Alan Cox
2010-11-24 20:18 ` [PATCH 00/12] SEP cleanups Randy Dunlap
2010-11-24 22:19   ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101124193814.16425.9000.stgit@bob.linux.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.a.allyn@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox