diff options
Diffstat (limited to 'drivers/infiniband/core/device.c')
-rw-r--r-- | drivers/infiniband/core/device.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c index 4007f721d25d..e711de400a01 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c | |||
@@ -627,6 +627,9 @@ int ib_modify_device(struct ib_device *device, | |||
627 | int device_modify_mask, | 627 | int device_modify_mask, |
628 | struct ib_device_modify *device_modify) | 628 | struct ib_device_modify *device_modify) |
629 | { | 629 | { |
630 | if (!device->modify_device) | ||
631 | return -ENOSYS; | ||
632 | |||
630 | return device->modify_device(device, device_modify_mask, | 633 | return device->modify_device(device, device_modify_mask, |
631 | device_modify); | 634 | device_modify); |
632 | } | 635 | } |
@@ -647,6 +650,9 @@ int ib_modify_port(struct ib_device *device, | |||
647 | u8 port_num, int port_modify_mask, | 650 | u8 port_num, int port_modify_mask, |
648 | struct ib_port_modify *port_modify) | 651 | struct ib_port_modify *port_modify) |
649 | { | 652 | { |
653 | if (!device->modify_port) | ||
654 | return -ENOSYS; | ||
655 | |||
650 | if (port_num < start_port(device) || port_num > end_port(device)) | 656 | if (port_num < start_port(device) || port_num > end_port(device)) |
651 | return -EINVAL; | 657 | return -EINVAL; |
652 | 658 | ||