Commit 85463d8e authored by Markus Elfring's avatar Markus Elfring Committed by Lee Jones

backlight: lp8788_bl: Delete a check before backlight_device_unregister()

The backlight_device_unregister() function tests whether its argument
is NULL and then returns immediately. Thus the test around the call is
not needed.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Acked-by: default avatarJingoo Han <jingoohan1@gmail.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 047ffbb2
......@@ -221,8 +221,7 @@ static void lp8788_backlight_unregister(struct lp8788_bl *bl)
{
struct backlight_device *bl_dev = bl->bl_dev;
if (bl_dev)
backlight_device_unregister(bl_dev);
backlight_device_unregister(bl_dev);
}
static ssize_t lp8788_get_bl_ctl_mode(struct device *dev,
......
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