patch-2.4.6 linux/drivers/media/video/i2c-parport.c
Next file: linux/drivers/media/video/planb.c
Previous file: linux/drivers/media/video/bttv-driver.c
Back to the patch index
Back to the overall index
- Lines: 11
- Date:
Wed Jun 27 17:10:55 2001
- Orig file:
v2.4.5/linux/drivers/media/video/i2c-parport.c
- Orig date:
Wed Jul 12 16:24:33 2000
diff -u --recursive --new-file v2.4.5/linux/drivers/media/video/i2c-parport.c linux/drivers/media/video/i2c-parport.c
@@ -74,6 +74,10 @@
{
struct parport_i2c_bus *b = kmalloc(sizeof(struct parport_i2c_bus),
GFP_KERNEL);
+ if (!b) {
+ printk(KERN_ERR "i2c_parport: Memory allocation failed. Not attaching.\n");
+ return;
+ }
b->i2c = parport_i2c_bus_template;
b->i2c.data = parport_get_port (port);
strncpy(b->i2c.name, port->name, 32);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)