Commit 47ec57ec authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Greg Kroah-Hartman

parport: remove unnecessary out of memory message

If kmalloc() or kzalloc() fails we will get sufficient messages in the logs,
no need to print these extra messages.
Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 13efa75d
...@@ -444,10 +444,8 @@ struct parport *parport_register_port(unsigned long base, int irq, int dma, ...@@ -444,10 +444,8 @@ struct parport *parport_register_port(unsigned long base, int irq, int dma,
int ret; int ret;
tmp = kzalloc(sizeof(struct parport), GFP_KERNEL); tmp = kzalloc(sizeof(struct parport), GFP_KERNEL);
if (!tmp) { if (!tmp)
printk(KERN_WARNING "parport: memory squeeze\n");
return NULL; return NULL;
}
/* Init our structure */ /* Init our structure */
tmp->base = base; tmp->base = base;
...@@ -473,7 +471,6 @@ struct parport *parport_register_port(unsigned long base, int irq, int dma, ...@@ -473,7 +471,6 @@ struct parport *parport_register_port(unsigned long base, int irq, int dma,
name = kmalloc(15, GFP_KERNEL); name = kmalloc(15, GFP_KERNEL);
if (!name) { if (!name) {
printk(KERN_ERR "parport: memory squeeze\n");
kfree(tmp); kfree(tmp);
return NULL; return NULL;
} }
...@@ -741,16 +738,12 @@ parport_register_device(struct parport *port, const char *name, ...@@ -741,16 +738,12 @@ parport_register_device(struct parport *port, const char *name,
parport_get_port (port); parport_get_port (port);
tmp = kmalloc(sizeof(struct pardevice), GFP_KERNEL); tmp = kmalloc(sizeof(struct pardevice), GFP_KERNEL);
if (tmp == NULL) { if (tmp == NULL)
printk(KERN_WARNING "%s: memory squeeze, couldn't register %s.\n", port->name, name);
goto out; goto out;
}
tmp->state = kmalloc(sizeof(struct parport_state), GFP_KERNEL); tmp->state = kmalloc(sizeof(struct parport_state), GFP_KERNEL);
if (tmp->state == NULL) { if (tmp->state == NULL)
printk(KERN_WARNING "%s: memory squeeze, couldn't register %s.\n", port->name, name);
goto out_free_pardevice; goto out_free_pardevice;
}
tmp->name = name; tmp->name = name;
tmp->port = port; tmp->port = port;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment