mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04: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
5fd8516a12
commit
691b019901
1 changed files with 1 additions and 2 deletions
|
|
@ -64,8 +64,7 @@ static int qcom_smd_qrtr_probe(struct rpmsg_device *rpdev)
|
|||
struct qrtr_smd_dev *qdev;
|
||||
u32 net_id;
|
||||
bool rt;
|
||||
int rc;
|
||||
size_t size;
|
||||
int rc, size;
|
||||
struct qrtr_array svc_arr = {NULL, 0};
|
||||
pr_info("%s:Entered\n", __func__);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue