]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/regulator/max8649.c
regulator: Remove NULL test before calling regulator_unregister()
[karo-tx-linux.git] / drivers / regulator / max8649.c
index 3ca14380f22db06aba4338544cf62967d48fa900..f44427003611f3876ddc076cd88e312eaf349052 100644 (file)
@@ -275,10 +275,8 @@ static int max8649_regulator_remove(struct i2c_client *client)
 {
        struct max8649_regulator_info *info = i2c_get_clientdata(client);
 
-       if (info) {
-               if (info->regulator)
-                       regulator_unregister(info->regulator);
-       }
+       if (info)
+               regulator_unregister(info->regulator);
 
        return 0;
 }