Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204932
b: refs/heads/master
c: c1b6d38
h: refs/heads/master
v: v3
  • Loading branch information
Grant Likely committed Jul 24, 2010
1 parent 79e1ed1 commit 2246830
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: 295960429675e17ec658320ebb24385727032bed
refs/heads/master: c1b6d380b781b5238989a4bfba02450057670804
7 changes: 6 additions & 1 deletion trunk/drivers/of/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@ static int platform_driver_probe_shim(struct platform_device *pdev)

pdrv = container_of(pdev->dev.driver, struct platform_driver, driver);
ofpdrv = container_of(pdrv, struct of_platform_driver, platform_driver);

/* There is an unlikely chance that an of_platform driver might match
* on a non-OF platform device. If so, then of_match_device() will
* come up empty. Return -EINVAL in this case so other drivers get
* the chance to bind. */
match = of_match_device(pdev->dev.driver->of_match_table, &pdev->dev);
return ofpdrv->probe(pdev, match);
return match ? ofpdrv->probe(pdev, match) : -EINVAL;
}

static void platform_driver_shutdown_shim(struct platform_device *pdev)
Expand Down

0 comments on commit 2246830

Please sign in to comment.