lkml.org 
[lkml]   [2007]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4/4] atm/ambassador: kmalloc + memset conversion to kzalloc
    Date
    atm/ambassador: kmalloc + memset conversion to kzalloc

    Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>

    Thanks.
    Joonwoo

    ---
    diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
    index b34b382..4f99ba3 100644
    --- a/drivers/atm/ambassador.c
    +++ b/drivers/atm/ambassador.c
    @@ -2163,7 +2163,6 @@ static int __devinit amb_init (amb_dev * dev)
    static void setup_dev(amb_dev *dev, struct pci_dev *pci_dev)
    {
    unsigned char pool;
    - memset (dev, 0, sizeof(amb_dev));

    // set up known dev items straight away
    dev->pci_dev = pci_dev;
    @@ -2253,7 +2252,7 @@ static int __devinit amb_probe(struct pci_dev *pci_dev, const struct pci_device_
    goto out_disable;
    }

    - dev = kmalloc (sizeof(amb_dev), GFP_KERNEL);
    + dev = kzalloc(sizeof(amb_dev), GFP_KERNEL);
    if (!dev) {
    PRINTK (KERN_ERR, "out of memory!");
    err = -ENOMEM;
    ---
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-11-26 10:07    [W:0.030 / U:59.308 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site