Skip to content

Commit ba67486

Browse files
Dingqiang Linrkhuangtao
authored andcommitted
soc: rockchip: fix flash_vendor_storage _flash_read pointer null error
Change-Id: Ie7e8a937f9439aec6922b178026f3381c772a26f Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
1 parent 9bc2be6 commit ba67486

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/soc/rockchip/flash_vendor_storage.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ static u32 flash_vendor_init(void)
7070
{
7171
u32 i, max_ver, max_index;
7272

73+
if (!_flash_read)
74+
return -EPERM;
75+
7376
g_vendor = kmalloc(sizeof(*g_vendor), GFP_KERNEL | GFP_DMA);
7477
if (!g_vendor)
7578
return 0;

0 commit comments

Comments
 (0)