Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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()

+4 -4
+4 -4
drivers/pci/controller/dwc/pci-keystone.c
··· 1200 1200 if (irq < 0) 1201 1201 return irq; 1202 1202 1203 - ret = request_irq(irq, ks_pcie_err_irq_handler, IRQF_SHARED, 1204 - "ks-pcie-error-irq", ks_pcie); 1203 + ret = devm_request_irq(dev, irq, ks_pcie_err_irq_handler, IRQF_SHARED, 1204 + "ks-pcie-error-irq", ks_pcie); 1205 1205 if (ret < 0) { 1206 1206 dev_err(dev, "failed to request error IRQ %d\n", 1207 1207 irq); ··· 1212 1212 if (ret) 1213 1213 num_lanes = 1; 1214 1214 1215 - phy = devm_kzalloc(dev, sizeof(*phy) * num_lanes, GFP_KERNEL); 1215 + phy = devm_kcalloc(dev, num_lanes, sizeof(*phy), GFP_KERNEL); 1216 1216 if (!phy) 1217 1217 return -ENOMEM; 1218 1218 1219 - link = devm_kzalloc(dev, sizeof(*link) * num_lanes, GFP_KERNEL); 1219 + link = devm_kcalloc(dev, num_lanes, sizeof(*link), GFP_KERNEL); 1220 1220 if (!link) 1221 1221 return -ENOMEM; 1222 1222