mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-12 11:36:35 +00:00
pinctrl: adi2: Improve a size determination in two functions
Replace the specification of data structures by variable references as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
419517f15d
commit
ce8b8d70d4
1 changed files with 2 additions and 3 deletions
|
@ -827,9 +827,8 @@ static int adi_gpio_pint_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct resource *res;
|
||||
struct gpio_pint *pint;
|
||||
struct gpio_pint *pint = devm_kzalloc(dev, sizeof(*pint), GFP_KERNEL);
|
||||
|
||||
pint = devm_kzalloc(dev, sizeof(struct gpio_pint), GFP_KERNEL);
|
||||
if (!pint)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -943,7 +942,7 @@ static int adi_gpio_probe(struct platform_device *pdev)
|
|||
if (!pdata)
|
||||
return -EINVAL;
|
||||
|
||||
port = devm_kzalloc(dev, sizeof(struct gpio_port), GFP_KERNEL);
|
||||
port = devm_kzalloc(dev, sizeof(*port), GFP_KERNEL);
|
||||
if (!port)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
Loading…
Reference in a new issue