Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: wm831x-dcdc: Remove redundant error message

kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>

authored by

Sachin Kamat and committed by
Mark Brown
5730aa57 38dbfb59

+4 -12
+4 -12
drivers/regulator/wm831x-dcdc.c
··· 469 469 470 470 dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), 471 471 GFP_KERNEL); 472 - if (dcdc == NULL) { 473 - dev_err(&pdev->dev, "Unable to allocate private data\n"); 472 + if (!dcdc) 474 473 return -ENOMEM; 475 - } 476 474 477 475 dcdc->wm831x = wm831x; 478 476 ··· 620 622 621 623 dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), 622 624 GFP_KERNEL); 623 - if (dcdc == NULL) { 624 - dev_err(&pdev->dev, "Unable to allocate private data\n"); 625 + if (!dcdc) 625 626 return -ENOMEM; 626 - } 627 627 628 628 dcdc->wm831x = wm831x; 629 629 ··· 748 752 return -ENODEV; 749 753 750 754 dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), GFP_KERNEL); 751 - if (dcdc == NULL) { 752 - dev_err(&pdev->dev, "Unable to allocate private data\n"); 755 + if (!dcdc) 753 756 return -ENOMEM; 754 - } 755 757 756 758 dcdc->wm831x = wm831x; 757 759 ··· 836 842 dev_dbg(&pdev->dev, "Probing EPE%d\n", id + 1); 837 843 838 844 dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), GFP_KERNEL); 839 - if (dcdc == NULL) { 840 - dev_err(&pdev->dev, "Unable to allocate private data\n"); 845 + if (!dcdc) 841 846 return -ENOMEM; 842 - } 843 847 844 848 dcdc->wm831x = wm831x; 845 849