mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
crypto: qat - silence a static checker warning
Add range check for ring number. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Tadeusz Struk <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
73613a8159
commit
55e8dba1ac
1 changed files with 4 additions and 0 deletions
|
|
@ -264,6 +264,10 @@ int adf_create_ring(struct adf_accel_dev *accel_dev, const char *section,
|
|||
dev_err(&GET_DEV(accel_dev), "Can't get ring number\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
if (ring_num >= ADF_ETR_MAX_RINGS_PER_BANK) {
|
||||
dev_err(&GET_DEV(accel_dev), "Invalid ring number\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
bank = &transport_data->banks[bank_num];
|
||||
if (adf_reserve_ring(bank, ring_num)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue