Commit 6273c437 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Helge Deller

fbdev: ssd1307fb: Drop duplicate NULL checks for PWM APIs

pwm_disable() and pwm_put() are NULL-aware, no need to
duplicate the check in the caller.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 025e3b50
......@@ -803,10 +803,8 @@ static int ssd1307fb_probe(struct i2c_client *client)
bl_init_error:
unregister_framebuffer(info);
panel_init_error:
if (par->device_info->need_pwm) {
pwm_disable(par->pwm);
pwm_put(par->pwm);
}
pwm_disable(par->pwm);
pwm_put(par->pwm);
regulator_enable_error:
if (par->vbat_reg)
regulator_disable(par->vbat_reg);
......@@ -827,10 +825,8 @@ static void ssd1307fb_remove(struct i2c_client *client)
backlight_device_unregister(info->bl_dev);
unregister_framebuffer(info);
if (par->device_info->need_pwm) {
pwm_disable(par->pwm);
pwm_put(par->pwm);
}
pwm_disable(par->pwm);
pwm_put(par->pwm);
if (par->vbat_reg)
regulator_disable(par->vbat_reg);
fb_deferred_io_cleanup(info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment