Commit 953c48f8 authored by Michael Hunold's avatar Michael Hunold Committed by Linus Torvalds

[PATCH] Fix error path in Video4Linux dpc7146 driver

The I2C adapter wasn't de-registered correctly in case the video card
wasn't found.  When the I2C subsystem tried to speak with the dangling
I2C adapter later on, usually an oops happened.
parent d1a816b5
......@@ -123,6 +123,7 @@ static int dpc_probe(struct saa7146_dev* dev)
/* check if all devices are present */
if( 0 == dpc->saa7111a ) {
DEB_D(("dpc_v4l2.o: dpc_attach failed for this device.\n"));
i2c_del_adapter(&dpc->i2c_adapter);
kfree(dpc);
return -ENODEV;
}
......
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