Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git] / drivers / gpu / drm / radeon / radeon_i2c.c
index 9590bcd..29f7817 100644 (file)
@@ -938,10 +938,8 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev,
                         "Radeon i2c hw bus %s", name);
                i2c->adapter.algo = &radeon_i2c_algo;
                ret = i2c_add_adapter(&i2c->adapter);
-               if (ret) {
-                       DRM_ERROR("Failed to register hw i2c %s\n", name);
+               if (ret)
                        goto out_free;
-               }
        } else if (rec->hw_capable &&
                   radeon_hw_i2c &&
                   ASIC_IS_DCE3(rdev)) {
@@ -950,10 +948,8 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev,
                         "Radeon i2c hw bus %s", name);
                i2c->adapter.algo = &radeon_atom_i2c_algo;
                ret = i2c_add_adapter(&i2c->adapter);
-               if (ret) {
-                       DRM_ERROR("Failed to register hw i2c %s\n", name);
+               if (ret)
                        goto out_free;
-               }
        } else {
                /* set the radeon bit adapter */
                snprintf(i2c->adapter.name, sizeof(i2c->adapter.name),
@@ -986,9 +982,8 @@ void radeon_i2c_destroy(struct radeon_i2c_chan *i2c)
 {
        if (!i2c)
                return;
+       WARN_ON(i2c->has_aux);
        i2c_del_adapter(&i2c->adapter);
-       if (i2c->has_aux)
-               drm_dp_aux_unregister(&i2c->aux);
        kfree(i2c);
 }