Commit f6843569 authored by Eduardo Valentin's avatar Eduardo Valentin Committed by Greg Kroah-Hartman

stating: ti-soc-thermal: use sizeof(*pointer) while allocating

Follow Documentation/CodingStyle and use sizeof(*pointer)
instead of sizeof(struct type).
Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9879b2c4
...@@ -900,8 +900,7 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev) ...@@ -900,8 +900,7 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
} }
bgp = devm_kzalloc(&pdev->dev, sizeof(struct ti_bandgap), bgp = devm_kzalloc(&pdev->dev, sizeof(*bgp), GFP_KERNEL);
GFP_KERNEL);
if (!bgp) { if (!bgp) {
dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n"); dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n");
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment