mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
Merge branch 'pci/controller/keystone'
- Use kcalloc() instead of kzalloc() to avoid potential integer overflow (Qianfeng Rong) - Use devm_request_irq() so 'ks-pcie-error-irq' is freed when driver exits with error (Siddharth Vadapalli) * pci/controller/keystone: PCI: keystone: Use devm_request_irq() to free "ks-pcie-error-irq" on exit PCI: keystone: Use kcalloc() instead of kzalloc()
This commit is contained in:
commit
836eec3a7c
|
|
@ -1200,8 +1200,8 @@ static int ks_pcie_probe(struct platform_device *pdev)
|
|||
if (irq < 0)
|
||||
return irq;
|
||||
|
||||
ret = request_irq(irq, ks_pcie_err_irq_handler, IRQF_SHARED,
|
||||
"ks-pcie-error-irq", ks_pcie);
|
||||
ret = devm_request_irq(dev, irq, ks_pcie_err_irq_handler, IRQF_SHARED,
|
||||
"ks-pcie-error-irq", ks_pcie);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to request error IRQ %d\n",
|
||||
irq);
|
||||
|
|
@ -1212,11 +1212,11 @@ static int ks_pcie_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
num_lanes = 1;
|
||||
|
||||
phy = devm_kzalloc(dev, sizeof(*phy) * num_lanes, GFP_KERNEL);
|
||||
phy = devm_kcalloc(dev, num_lanes, sizeof(*phy), GFP_KERNEL);
|
||||
if (!phy)
|
||||
return -ENOMEM;
|
||||
|
||||
link = devm_kzalloc(dev, sizeof(*link) * num_lanes, GFP_KERNEL);
|
||||
link = devm_kcalloc(dev, num_lanes, sizeof(*link), GFP_KERNEL);
|
||||
if (!link)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user