diag: Fix compilation error with new sdclang 12

Fix the compilation error with sdclang 12.0.

Change-Id: If6b5caf655568b0d4ee12a71927df9476f3b4c55
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
This commit is contained in:
Swetha Chikkaboraiah 2021-08-13 09:40:52 +05:30 • committed by Edwin Moquete
commit 95bd01d3ca

View file

@ -181,7 +181,7 @@ void *diagmem_alloc(struct diagchar_dev *driver, int size, int pool_type)
break;
}
if (size == 0 || size > mempool->itemsize ||
size > (int)mempool->pool->pool_data) {
size > (size_t)mempool->pool->pool_data) {
pr_err_ratelimited("diag: cannot alloc from mempool %s, invalid size: %d\n",
mempool->name, size);
break;