diff options
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_verbs.c')
| -rw-r--r-- | drivers/infiniband/hw/ipath/ipath_verbs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index eabc4247860b..cdf0e6abd34d 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c | |||
| @@ -1852,7 +1852,7 @@ unsigned ipath_get_npkeys(struct ipath_devdata *dd) | |||
| 1852 | } | 1852 | } |
| 1853 | 1853 | ||
| 1854 | /** | 1854 | /** |
| 1855 | * ipath_get_pkey - return the indexed PKEY from the port 0 PKEY table | 1855 | * ipath_get_pkey - return the indexed PKEY from the port PKEY table |
| 1856 | * @dd: the infinipath device | 1856 | * @dd: the infinipath device |
| 1857 | * @index: the PKEY index | 1857 | * @index: the PKEY index |
| 1858 | */ | 1858 | */ |
| @@ -1860,6 +1860,7 @@ unsigned ipath_get_pkey(struct ipath_devdata *dd, unsigned index) | |||
| 1860 | { | 1860 | { |
| 1861 | unsigned ret; | 1861 | unsigned ret; |
| 1862 | 1862 | ||
| 1863 | /* always a kernel port, no locking needed */ | ||
| 1863 | if (index >= ARRAY_SIZE(dd->ipath_pd[0]->port_pkeys)) | 1864 | if (index >= ARRAY_SIZE(dd->ipath_pd[0]->port_pkeys)) |
| 1864 | ret = 0; | 1865 | ret = 0; |
| 1865 | else | 1866 | else |
