提交 46b34886 编写于 作者: B Ben Skeggs

drm/nouveau: fix oops if i2c bus not found in nouveau_i2c_identify()

Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 bde4889a
...@@ -333,7 +333,7 @@ nouveau_i2c_identify(struct drm_device *dev, const char *what, ...@@ -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); 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) && if (nouveau_probe_i2c_addr(i2c, info[i].addr) &&
(!match || match(i2c, &info[i]))) { (!match || match(i2c, &info[i]))) {
NV_INFO(dev, "Detected %s: %s\n", what, info[i].type); NV_INFO(dev, "Detected %s: %s\n", what, info[i].type);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册