Commit 659e7142 authored by Markus Elfring's avatar Markus Elfring Committed by Linus Walleij
Browse files

pinctrl: vt8500: Delete an error message for a failed memory allocation in five functions



Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent b18b2e77
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -458,10 +458,8 @@ static int vt8500_pinctrl_probe(struct platform_device *pdev)
	struct wmt_pinctrl_data *data;

	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
	if (!data) {
		dev_err(&pdev->dev, "failed to allocate data\n");
	if (!data)
		return -ENOMEM;
	}

	data->banks = vt8500_banks;
	data->nbanks = ARRAY_SIZE(vt8500_banks);
+1 −3
Original line number Diff line number Diff line
@@ -489,10 +489,8 @@ static int wm8505_pinctrl_probe(struct platform_device *pdev)
	struct wmt_pinctrl_data *data;

	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
	if (!data) {
		dev_err(&pdev->dev, "failed to allocate data\n");
	if (!data)
		return -ENOMEM;
	}

	data->banks = wm8505_banks;
	data->nbanks = ARRAY_SIZE(wm8505_banks);
+1 −3
Original line number Diff line number Diff line
@@ -327,10 +327,8 @@ static int wm8650_pinctrl_probe(struct platform_device *pdev)
	struct wmt_pinctrl_data *data;

	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
	if (!data) {
		dev_err(&pdev->dev, "failed to allocate data\n");
	if (!data)
		return -ENOMEM;
	}

	data->banks = wm8650_banks;
	data->nbanks = ARRAY_SIZE(wm8650_banks);
+1 −3
Original line number Diff line number Diff line
@@ -366,10 +366,8 @@ static int wm8750_pinctrl_probe(struct platform_device *pdev)
	struct wmt_pinctrl_data *data;

	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
	if (!data) {
		dev_err(&pdev->dev, "failed to allocate data\n");
	if (!data)
		return -ENOMEM;
	}

	data->banks = wm8750_banks;
	data->nbanks = ARRAY_SIZE(wm8750_banks);
+1 −3
Original line number Diff line number Diff line
@@ -345,10 +345,8 @@ static int wm8850_pinctrl_probe(struct platform_device *pdev)
	struct wmt_pinctrl_data *data;

	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
	if (!data) {
		dev_err(&pdev->dev, "failed to allocate data\n");
	if (!data)
		return -ENOMEM;
	}

	data->banks = wm8850_banks;
	data->nbanks = ARRAY_SIZE(wm8850_banks);