lkml.org 
[lkml]   [2022]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH] powerpc: 8xx: fix a return value error in mpc8xx_pic_init
Date


Le 07/03/2022 à 02:41, Hangyu Hua a écrit :
> Ping?
>
> On 2022/2/23 15:02, Hangyu Hua wrote:
>> mpc8xx_pic_init() should return -ENOMEM instead of 0 when
>> irq_domain_add_linear() return NULL. This cause mpc8xx_pics_init to
>> continue
>> executing even if mpc8xx_pic_host is NULL.
>>
>> Fixes: cc76404feaed ("powerpc/8xx: Fix possible device node reference
>> leak")
>> Signed-off-by: Hangyu Hua <hbh25y@gmail.com>

Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>

>> ---
>>   arch/powerpc/platforms/8xx/pic.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/powerpc/platforms/8xx/pic.c
>> b/arch/powerpc/platforms/8xx/pic.c
>> index f2ba837249d6..04a6abf14c29 100644
>> --- a/arch/powerpc/platforms/8xx/pic.c
>> +++ b/arch/powerpc/platforms/8xx/pic.c
>> @@ -153,6 +153,7 @@ int __init mpc8xx_pic_init(void)
>>       if (mpc8xx_pic_host == NULL) {
>>           printk(KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n");
>>           ret = -ENOMEM;
>> +        goto out;
>>       }
>>       ret = 0;
\
 
 \ /
  Last update: 2022-03-08 16:02    [W:0.108 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site