Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101303
b: refs/heads/master
c: e045744
h: refs/heads/master
i:
  101301: 32a9022
  101299: e067cb4
  101295: 38f1ad8
v: v3
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Jul 14, 2008
1 parent bd530b2 commit 62badbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b4dff9cd37d430bc76112396e92bb3552f37ccd
refs/heads/master: e0457442fd522107204da14a2dc2cbbb5dcac5f6
9 changes: 2 additions & 7 deletions trunk/drivers/i2c/i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,14 @@ static int i2c_device_probe(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct i2c_driver *driver = to_i2c_driver(dev->driver);
const struct i2c_device_id *id;
int status;

if (!driver->probe)
if (!driver->probe || !driver->id_table)
return -ENODEV;
client->driver = driver;
dev_dbg(dev, "probe\n");

if (driver->id_table)
id = i2c_match_id(driver->id_table, client);
else
id = NULL;
status = driver->probe(client, id);
status = driver->probe(client, i2c_match_id(driver->id_table, client));
if (status)
client->driver = NULL;
return status;
Expand Down

0 comments on commit 62badbf

Please sign in to comment.