mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
net: qrtr: fix type for size in smd
The return value for of_property_count_u32_elems can be negative in the case of an error or the property is not found. It is incorrect to use size_t, unsigned type, as this can cause an overflow. Switch size from type size_t to int. Change-Id: Ica0425abd034b82994ab32087f04d602ce3dd9e9 Signed-off-by: Tony Truong <quic_truong@quicinc.com>
This commit is contained in:
parent
1da9ab5d38
commit
ab95e090ae
|
|
@ -68,8 +68,8 @@ static int qcom_smd_qrtr_probe(struct rpmsg_device *rpdev)
|
|||
{
|
||||
struct qrtr_array svc_arr = {NULL, 0};
|
||||
struct qrtr_smd_dev *qdev;
|
||||
size_t size;
|
||||
u32 net_id;
|
||||
int size;
|
||||
bool rt;
|
||||
int rc;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user