mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 23:23:53 +02: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:
parent
1319af9010
commit
dd9460f593
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user