Skip to content

Commit

Permalink
drm/nouveau: fix oops if i2c bus not found in nouveau_i2c_identify()
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Nov 9, 2011
1 parent bde4889 commit 46b3488
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nouveau_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ nouveau_i2c_identify(struct drm_device *dev, const char *what,

NV_DEBUG(dev, "Probing %ss on I2C bus: %d\n", what, index);

for (i = 0; info[i].addr; i++) {
for (i = 0; i2c && info[i].addr; i++) {
if (nouveau_probe_i2c_addr(i2c, info[i].addr) &&
(!match || match(i2c, &info[i]))) {
NV_INFO(dev, "Detected %s: %s\n", what, info[i].type);
Expand Down

0 comments on commit 46b3488

Please sign in to comment.