2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 20:53:53 +08:00
linux-next/drivers/net/ethernet/ti
Daniel Mack c2b32e580c net: ethernet: cpsw: improve interrupt lookup logic in cpsw_probe()
Simplify the interrupt resource lookup code in cpsw_probe() by the
following:

 * Only look at the first member of the resource. As the driver only
   works for DT-enabled platforms anyway, a resource of type
   IORESOURCE_IRQ will only contain one single entry
   (res->start == res->end), so there is no need for the iteration.

 * Add a bounds check to avoid overflows if we are passed more than
   ARRAY_SIZE(priv->irqs_table) resources.

 * Assign 'ret' with the return value of devm_request_irq() so that
   cpsw_probe() returns the appropriate error code.

 * If devm_request_irq() fails, report the error code in the log
   message.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Mugunthan V N <mugunthanvnm@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-05 17:17:13 -07:00
..
cpmac.c net: ethernet: ti: cpmac.c: Cleaning up missing null-terminate after strncpy call 2014-08-11 12:27:53 -07:00
cpsw_ale.c drivers: net: cpsw: add support to dump ALE table via ethtool register dump 2014-07-22 19:58:25 -07:00
cpsw_ale.h drivers: net: cpsw: add support to dump ALE table via ethtool register dump 2014-07-22 19:58:25 -07:00
cpsw-phy-sel.c drivers: net: cpsw-phy-sel: add am43xx platform support 2014-05-13 00:11:00 -04:00
cpsw.c net: ethernet: cpsw: improve interrupt lookup logic in cpsw_probe() 2014-09-05 17:17:13 -07:00
cpsw.h drivers: net: cpsw-phy-sel: Add new driver for phy mode selection for cpsw 2013-09-24 10:33:07 -04:00
cpts.c ptp: Classify ptp over ip over vlan packets 2014-07-07 16:57:18 -07:00
cpts.h ti: Remove extern from function prototypes 2013-09-24 12:54:10 -07:00
davinci_cpdma.c drivers: net: davinci_cpdma: double free on error 2014-06-11 15:39:19 -07:00
davinci_cpdma.h net/davinci_cpdma: remove unused argument in cpdma_chan_submit() 2013-04-25 04:11:50 -04:00
davinci_emac.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-06-03 23:32:12 -07:00
davinci_mdio.c net: davinci_mdio: allow to create phys from dt 2014-07-16 23:33:16 -07:00
Kconfig net: davinci_mdio: reuse for keystone2 arch 2014-07-16 23:33:16 -07:00
Makefile drivers: net: cpsw-phy-sel: Add new driver for phy mode selection for cpsw 2013-09-24 10:33:07 -04:00
tlan.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
tlan.h tlan: Don't scream if no link 2014-07-07 17:06:52 -07:00