mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:04:51 +01:00
gpio: loongson-64bit: Fix incorrect NULL check after devm_kcalloc()
Fix incorrect NULL check in loongson_gpio_init_irqchip().
The function checks chip->parent instead of chip->irq.parents.
Fixes: 03c146cb6c ("gpio: loongson-64bit: Add support for Loongson-2K0300 SoC")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://patch.msgid.link/20260205072649.3271158-1-nichen@iscas.ac.cn
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
This commit is contained in:
parent
c62e0658d4
commit
e34f77b090
1 changed files with 1 additions and 1 deletions
|
|
@ -263,7 +263,7 @@ static int loongson_gpio_init_irqchip(struct platform_device *pdev,
|
|||
chip->irq.num_parents = data->intr_num;
|
||||
chip->irq.parents = devm_kcalloc(&pdev->dev, data->intr_num,
|
||||
sizeof(*chip->irq.parents), GFP_KERNEL);
|
||||
if (!chip->parent)
|
||||
if (!chip->irq.parents)
|
||||
return -ENOMEM;
|
||||
|
||||
for (i = 0; i < data->intr_num; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue