The locking ranges count and the array items are always ignored unless
Single User Mode (SUM) is requested in the activate method.
It is useless to enforce limits of unused array in the non-SUM case.
Signed-off-by: Ondrej Kozina <okozina@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
};
int ret;
- if (!opal_lr_act->num_lrs || opal_lr_act->num_lrs > OPAL_MAX_LRS)
+ if (opal_lr_act->sum &&
+ (!opal_lr_act->num_lrs || opal_lr_act->num_lrs > OPAL_MAX_LRS))
return -EINVAL;
ret = opal_get_key(dev, &opal_lr_act->key);