mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-18 10:56:14 +00:00
drm/nouveau: fix oops if i2c bus not found in nouveau_i2c_identify()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
bde4889aaa
commit
46b3488650
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user