mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
video: rockchip: rk322x_lcdc: fix error condition
Change-Id: I1c28a815beb74a7566886aef666454ec1513970b Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
This commit is contained in:
@@ -3478,7 +3478,7 @@ static int vop_get_backlight_device(struct rk_lcdc_driver *dev_drv)
|
||||
max = length / sizeof(u32);
|
||||
last = max - 1;
|
||||
brightness_levels = kmalloc(256, GFP_KERNEL);
|
||||
if (brightness_levels)
|
||||
if (!brightness_levels)
|
||||
return -ENOMEM;
|
||||
|
||||
if (!of_property_read_u32_array(backlight, "brightness-levels",
|
||||
|
||||
Reference in New Issue
Block a user