regulator: Remove NULL test before calling regulator_unregister()
It's safe to call regulator_unregister() with NULL, thus remove the NULL test before regulator_unregister() calls. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@sirena.org.uk>
このコミットが含まれているのは:
@@ -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;
|
||||
}
|
||||
|
新しいイシューから参照
ユーザーをブロックする