diff options
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi_mpc83xx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c index f4573a96af24..a32ccb44065e 100644 --- a/drivers/spi/spi_mpc83xx.c +++ b/drivers/spi/spi_mpc83xx.c | |||
@@ -711,12 +711,12 @@ static int of_mpc83xx_spi_get_chipselects(struct device *dev) | |||
711 | return 0; | 711 | return 0; |
712 | } | 712 | } |
713 | 713 | ||
714 | pinfo->gpios = kmalloc(ngpios * sizeof(pinfo->gpios), GFP_KERNEL); | 714 | pinfo->gpios = kmalloc(ngpios * sizeof(*pinfo->gpios), GFP_KERNEL); |
715 | if (!pinfo->gpios) | 715 | if (!pinfo->gpios) |
716 | return -ENOMEM; | 716 | return -ENOMEM; |
717 | memset(pinfo->gpios, -1, ngpios * sizeof(pinfo->gpios)); | 717 | memset(pinfo->gpios, -1, ngpios * sizeof(*pinfo->gpios)); |
718 | 718 | ||
719 | pinfo->alow_flags = kzalloc(ngpios * sizeof(pinfo->alow_flags), | 719 | pinfo->alow_flags = kzalloc(ngpios * sizeof(*pinfo->alow_flags), |
720 | GFP_KERNEL); | 720 | GFP_KERNEL); |
721 | if (!pinfo->alow_flags) { | 721 | if (!pinfo->alow_flags) { |
722 | ret = -ENOMEM; | 722 | ret = -ENOMEM; |