forked from luck/tmp_suning_uos_patched
ARM SCMI fixes/cleanup for v5.2
1. Fix for of_node reference leak in scmi_mailbox_check by passing NULL argument to of_parse_phandle_with_args instead of dummy argument 2. Cleanup of_match_device->data NULL pointer handling using of_device_get_match_data() helper -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAly14rkACgkQAEG6vDF+ 4pgtpQ/+PD/a3zteEV6eTu4iT96pJ0NG+6gCYBRBIG5qLQwAJITbeX41/2in/0Hp U6pTejd2mnDNYnPJiVZ4It+QZ8Hs70cB08zCG8/5g3EGGALmjRNGAfZpal5gQJt0 HlMLTUSm7qZO1y5Y9WhXqUpdVt9yHPldP6DUj7JlvtlmEK2QLTTnqC8gb5j9T4hD Py+tFb5jN4Hbs+h7ii5azatg9kwJbTiDV3LYOFyQ2inWK0qcW4DAZzPdbr9eMpNe +zUJD2ErDpaNVeYIaxUcNmG53bRzY5XF9EUCsWqqbdpcW/OdgSSpShav/eaJGRce 9WEGKuPoDbQwJbr1QXsRtDuR8YSsxlpUKTZ74YohxJokkoZ/dGoOKf/RzMrYHwPR QO+DKfzyv8i9KujSjaq34fRLFJHIKHJZ7jgf2a0oehsrJ9PvtXt8rzkoAPWZaZe2 GtDge00LW8jPTES6MTedS0/fR+rohPU9u1rQLjESROOoPc1fNq7SA1eebtLEuDtQ 4p74b5lLxLzTkipd9rCh2UoYb/MaqB9Ykkk8py7lqmnOR1wD/+nqFIcRb+QWo8DC +sDdRAsMQMFLJjjNBxNgx79fkCH5MHP8Y73MiEhhsKwioUx8BglP7ujOEg4iSzbF nBw9dVoBJ9pTaM/I9wkDCTzJXNzr7BtqdAgMotUAmSRY/bFMhoM= =j75N -----END PGP SIGNATURE----- Merge tag 'scmi-fixes-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/drivers ARM SCMI fixes/cleanup for v5.2 1. Fix for of_node reference leak in scmi_mailbox_check by passing NULL argument to of_parse_phandle_with_args instead of dummy argument 2. Cleanup of_match_device->data NULL pointer handling using of_device_get_match_data() helper * tag 'scmi-fixes-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: replace of_match_device->data with of_device_get_match_data() firmware: arm_scmi: fix of_node leak in scmi_mailbox_check Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
commit
7f26bb130a
|
@ -654,9 +654,7 @@ static int scmi_xfer_info_init(struct scmi_info *sinfo)
|
|||
|
||||
static int scmi_mailbox_check(struct device_node *np)
|
||||
{
|
||||
struct of_phandle_args arg;
|
||||
|
||||
return of_parse_phandle_with_args(np, "mboxes", "#mbox-cells", 0, &arg);
|
||||
return of_parse_phandle_with_args(np, "mboxes", "#mbox-cells", 0, NULL);
|
||||
}
|
||||
|
||||
static int scmi_mbox_free_channel(int id, void *p, void *data)
|
||||
|
@ -798,7 +796,9 @@ static int scmi_probe(struct platform_device *pdev)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
desc = of_match_device(scmi_of_match, dev)->data;
|
||||
desc = of_device_get_match_data(dev);
|
||||
if (!desc)
|
||||
return -EINVAL;
|
||||
|
||||
info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
|
||||
if (!info)
|
||||
|
|
Loading…
Reference in New Issue
Block a user