mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Merge tag 'ASB-2024-10-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
https://source.android.com/docs/security/bulletin/2024-10-01 * tag 'ASB-2024-10-05_11-5.4' of https://android.googlesource.com/kernel/common: (397 commits) Linux 5.4.283 scsi: aacraid: Fix double-free on probe failure net: dsa: mv8e6xxx: Fix stub function parameters usb: core: sysfs: Unmerge @usb3_hardware_lpm_attr_group in remove_power_attributes() usb: dwc3: st: add missing depopulate in probe error path usb: dwc3: st: fix probed platform device ref count on probe error path usb: dwc3: core: Prevent USB core invalid event buffer address access usb: dwc3: omap: add missing depopulate in probe error path USB: serial: option: add MeiG Smart SRM825L cdc-acm: Add DISABLE_ECHO quirk for GE HealthCare UI Controller soc: qcom: cmd-db: Map shared memory as WC, not WB nfc: pn533: Add poll mod list filling check nfc: pn533: Add autopoll capability nfc: pn533: Add dev_up/dev_down hooks to phy_ops net: busy-poll: use ktime_get_ns() instead of local_clock() gtp: fix a potential NULL pointer dereference ethtool: check device is present when getting link settings r8152: Factor out OOB link list waits soundwire: stream: fix programming slave ports for non-continous port maps net:rds: Fix possible deadlock in rds_message_put ... Change-Id: Ia6559a770f5db990f2bf6e5a034c63e3d7df4510
This commit is contained in:
commit
a421f676d6
376 changed files with 3731 additions and 1792 deletions
|
|
@ -2018,6 +2018,14 @@ out_err:
|
|||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
static void pinctrl_uninit_controller(struct pinctrl_dev *pctldev, struct pinctrl_desc *pctldesc)
|
||||
{
|
||||
pinctrl_free_pindescs(pctldev, pctldesc->pins,
|
||||
pctldesc->npins);
|
||||
mutex_destroy(&pctldev->mutex);
|
||||
kfree(pctldev);
|
||||
}
|
||||
|
||||
static int pinctrl_claim_hogs(struct pinctrl_dev *pctldev)
|
||||
{
|
||||
pctldev->p = create_pinctrl(pctldev->dev, pctldev);
|
||||
|
|
@ -2098,8 +2106,10 @@ struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc,
|
|||
return pctldev;
|
||||
|
||||
error = pinctrl_enable(pctldev);
|
||||
if (error)
|
||||
if (error) {
|
||||
pinctrl_uninit_controller(pctldev, pctldesc);
|
||||
return ERR_PTR(error);
|
||||
}
|
||||
|
||||
return pctldev;
|
||||
|
||||
|
|
|
|||
|
|
@ -405,8 +405,8 @@ static int mxs_pinctrl_probe_dt(struct platform_device *pdev,
|
|||
int ret;
|
||||
u32 val;
|
||||
|
||||
child = of_get_next_child(np, NULL);
|
||||
if (!child) {
|
||||
val = of_get_child_count(np);
|
||||
if (val == 0) {
|
||||
dev_err(&pdev->dev, "no group is defined\n");
|
||||
return -ENOENT;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -323,6 +323,8 @@ static int pcs_get_function(struct pinctrl_dev *pctldev, unsigned pin,
|
|||
return -ENOTSUPP;
|
||||
fselector = setting->func;
|
||||
function = pinmux_generic_get_function(pctldev, fselector);
|
||||
if (!function)
|
||||
return -EINVAL;
|
||||
*func = function->data;
|
||||
if (!(*func)) {
|
||||
dev_err(pcs->dev, "%s could not find function%i\n",
|
||||
|
|
@ -1311,7 +1313,6 @@ static void pcs_irq_free(struct pcs_device *pcs)
|
|||
static void pcs_free_resources(struct pcs_device *pcs)
|
||||
{
|
||||
pcs_irq_free(pcs);
|
||||
pinctrl_unregister(pcs->pctl);
|
||||
|
||||
#if IS_BUILTIN(CONFIG_PINCTRL_SINGLE)
|
||||
if (pcs->missing_nr_pinctrl_cells)
|
||||
|
|
@ -1864,7 +1865,7 @@ static int pcs_probe(struct platform_device *pdev)
|
|||
if (ret < 0)
|
||||
goto free;
|
||||
|
||||
ret = pinctrl_register_and_init(&pcs->desc, pcs->dev, pcs, &pcs->pctl);
|
||||
ret = devm_pinctrl_register_and_init(pcs->dev, &pcs->desc, pcs, &pcs->pctl);
|
||||
if (ret) {
|
||||
dev_err(pcs->dev, "could not register single pinctrl driver\n");
|
||||
goto free;
|
||||
|
|
@ -1897,8 +1898,10 @@ static int pcs_probe(struct platform_device *pdev)
|
|||
|
||||
dev_info(pcs->dev, "%i pins, size %u\n", pcs->desc.npins, pcs->size);
|
||||
|
||||
return pinctrl_enable(pcs->pctl);
|
||||
if (pinctrl_enable(pcs->pctl))
|
||||
goto free;
|
||||
|
||||
return 0;
|
||||
free:
|
||||
pcs_free_resources(pcs);
|
||||
|
||||
|
|
|
|||
|
|
@ -881,7 +881,7 @@ static int ti_iodelay_probe(struct platform_device *pdev)
|
|||
iod->desc.name = dev_name(dev);
|
||||
iod->desc.owner = THIS_MODULE;
|
||||
|
||||
ret = pinctrl_register_and_init(&iod->desc, dev, iod, &iod->pctl);
|
||||
ret = devm_pinctrl_register_and_init(dev, &iod->desc, iod, &iod->pctl);
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to register pinctrl\n");
|
||||
goto exit_out;
|
||||
|
|
@ -889,7 +889,11 @@ static int ti_iodelay_probe(struct platform_device *pdev)
|
|||
|
||||
platform_set_drvdata(pdev, iod);
|
||||
|
||||
return pinctrl_enable(iod->pctl);
|
||||
ret = pinctrl_enable(iod->pctl);
|
||||
if (ret)
|
||||
goto exit_out;
|
||||
|
||||
return 0;
|
||||
|
||||
exit_out:
|
||||
of_node_put(np);
|
||||
|
|
@ -906,12 +910,6 @@ static int ti_iodelay_remove(struct platform_device *pdev)
|
|||
{
|
||||
struct ti_iodelay_device *iod = platform_get_drvdata(pdev);
|
||||
|
||||
if (!iod)
|
||||
return 0;
|
||||
|
||||
if (iod->pctl)
|
||||
pinctrl_unregister(iod->pctl);
|
||||
|
||||
ti_iodelay_pinconf_deinit_dev(iod);
|
||||
|
||||
/* Expect other allocations to be freed by devm */
|
||||
|
|
|
|||
Loading…
Reference in a new issue