Two fixes for the pin control subsystem, both relating to
the errorpath in probe(). -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJTul7RAAoJEEEQszewGV1zyP4QAMZxc5gVf5zOjyd+EtxuYkiC lWxR4c8uzet8FQ6J0uMdThG6sK4TTFKNz+rP69DUcRY8EM03fgkgCVkynkWzYftZ YcgxUAJDNxXygy+GxvfL5qQMQVHCSPfj6knqsOK2b26fwt5Y4u0TbI5NWC/rMe4B sN0NQTdLxYOBVnYbgDRYCsQ7+2HbwCRsBrShdTgISw49qK2q2EhrbIvbjmFYZBSa u2cRKYy9MOHSwDd0S/ryIQ4wYiq/MGWtu1RP5zb+1GJzXPDOYhQnwMDsGgqTlIk3 2wMy3T2psvk542pUYm3lxzWc2v39eKzvvwqG9NWrdXml42EcI8FnqnJ34hSBXM8y dS1laWks9m10RxnOiiDHpa2f85raBDlGou1awHwSrfXQHm+PqNcMgDTgmnIRiIUi OunLqh3fhYqBisAExzqaagchjpGpCTQTuWS3xgzRdwj6NIZkr7yvDyFfUM0oVPJ/ Yzyl677+I5ppp41YrYLVGGtsj+f2ao+epsz5pD+9uC+HbhMYeo1pJXT3IbEfi5iW Az7QDNl2qGLpSldKmSYgle6Xoa8UhVJK/+VEiXZ7w20GIWho1vaFCNFPg0bU60jx lhwejXmpLcuAv3f/jX5BWLKa2sZw2yy9Tg77WnqW1JfFmSnVf5KLI0HryuDIg0Nw XRhO79nXTrCgj+a4lL5r =Ya5E -----END PGP SIGNATURE----- Merge tag 'pinctrl-v3.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Two fixes for the pin control subsystem, both relating to the error path in probe() I'm a bit snowed under by mail but these have boiled in linux-next and should propagate to you" * tag 'pinctrl-v3.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: berlin: fix an error code in berlin_pinctrl_probe() pinctrl: sunxi: Fix potential null pointer dereference
This commit is contained in:
Коммит
92556e6039
|
@ -320,7 +320,7 @@ int berlin_pinctrl_probe(struct platform_device *pdev,
|
|||
|
||||
regmap = dev_get_regmap(&pdev->dev, NULL);
|
||||
if (!regmap)
|
||||
return PTR_ERR(regmap);
|
||||
return -ENODEV;
|
||||
|
||||
pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL);
|
||||
if (!pctrl)
|
||||
|
|
|
@ -211,6 +211,10 @@ static int sunxi_pctrl_dt_node_to_map(struct pinctrl_dev *pctldev,
|
|||
configlen++;
|
||||
|
||||
pinconfig = kzalloc(configlen * sizeof(*pinconfig), GFP_KERNEL);
|
||||
if (!pinconfig) {
|
||||
kfree(*map);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (!of_property_read_u32(node, "allwinner,drive", &val)) {
|
||||
u16 strength = (val + 1) * 10;
|
||||
|
|
Загрузка…
Ссылка в новой задаче