mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
spi: takes size of a pointer to determine the size of the pointed-to type
Do not take the size of a pointer to determine the size of the pointed-to type. Signed-off-by: Roel Kluin <[email protected]> Acked-by: Anton Vorontsov <[email protected]> Cc: David Brownell <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Kumar Gala <[email protected]> Acked-by: Grant Likely <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
08604bd993
commit
021415468c
1 changed files with 3 additions and 3 deletions
|
|
@ -711,12 +711,12 @@ static int of_mpc83xx_spi_get_chipselects(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
pinfo->gpios = kmalloc(ngpios * sizeof(pinfo->gpios), GFP_KERNEL);
|
||||
pinfo->gpios = kmalloc(ngpios * sizeof(*pinfo->gpios), GFP_KERNEL);
|
||||
if (!pinfo->gpios)
|
||||
return -ENOMEM;
|
||||
memset(pinfo->gpios, -1, ngpios * sizeof(pinfo->gpios));
|
||||
memset(pinfo->gpios, -1, ngpios * sizeof(*pinfo->gpios));
|
||||
|
||||
pinfo->alow_flags = kzalloc(ngpios * sizeof(pinfo->alow_flags),
|
||||
pinfo->alow_flags = kzalloc(ngpios * sizeof(*pinfo->alow_flags),
|
||||
GFP_KERNEL);
|
||||
if (!pinfo->alow_flags) {
|
||||
ret = -ENOMEM;
|
||||
|
|
|
|||
Loading…
Reference in a new issue