[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 03 Mar 2015 10:56:48 -0800
From: Stephen Boyd <sboyd@...eaurora.org>
To: Bjorn Andersson <bjorn.andersson@...ymobile.com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Lee Jones <lee.jones@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Pawel Moll <pawel.moll@....com>,
Rob Herring <robh+dt@...nel.org>,
Andy Gross <agross@...eaurora.org>
CC: Chanwoo Choi <cw00.choi@...sung.com>,
Krzysztof Kozlowski <k.kozlowski@...sung.com>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH 3/4] regulator: qcom: Refactor of-parsing code
On 03/02/15 20:25, Bjorn Andersson wrote:
> +
> +static int rpm_reg_probe(struct platform_device *pdev)
> +{
> + struct regulator_init_data *initdata;
> + const struct qcom_rpm_reg *template;
> + const struct of_device_id *match;
> + struct regulator_config config = { };
> + struct regulator_dev *rdev;
> + struct qcom_rpm_reg *vreg;
> + const char *key;
> + u32 val;
> + int ret;
> +
> + match = of_match_device(rpm_of_match, &pdev->dev);
> + template = match->data;
> +
> + vreg = devm_kmalloc(&pdev->dev, sizeof(*vreg), GFP_KERNEL);
> + if (!vreg) {
> + dev_err(&pdev->dev, "failed to allocate vreg\n");
We don't need error messages on allocation failures.
> + return -ENOMEM;
> + }
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists