summaryrefslogtreecommitdiffstats
path: root/net/core/dev_ioctl.c
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2014-09-04 09:00:23 +0200
committerDavid S. Miller <davem@davemloft.net>2014-09-05 17:17:13 -0700
commitc2b32e580ccc574cf353661ee6d900947e9fdf28 (patch)
tree3e086c638970122c91c8c344b8c62786e5a04303 /net/core/dev_ioctl.c
parentcaa415270c732505240bb60171c44a7838c555e8 (diff)
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>
Diffstat (limited to 'net/core/dev_ioctl.c')
0 files changed, 0 insertions, 0 deletions