diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-04 14:28:22 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-04 14:28:22 -0700 |
commit | c9946d014fe8da95257a118ba946bd4bd44a0c86 (patch) | |
tree | 5c9581b89130180861c124f65ba46808002e381c /drivers/hsi/controllers | |
parent | a897a10141ae4deb43346fbf2ae2a5149bd7fd5a (diff) | |
parent | 67ddd75771b6b860bc0cebb3b7fd4cbebeda9cd4 (diff) | |
download | linux-stable-c9946d014fe8da95257a118ba946bd4bd44a0c86.tar.gz linux-stable-c9946d014fe8da95257a118ba946bd4bd44a0c86.tar.bz2 linux-stable-c9946d014fe8da95257a118ba946bd4bd44a0c86.zip |
Merge tag 'hsi-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi
Pull HSI updates from Sebastian Reichel:
"Misc cleanups"
* tag 'hsi-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
HSI: core: Use kcalloc() in two functions
HSI: Use kcalloc() in hsi_register_board_info()
HSI: omap_ssi: Delete an error message for a failed memory allocation in ssi_add_controller()
HSI: omap_ssi: Fix a typo in a comment line
HSI: omap_ssi: Use devm_kcalloc() in ssi_add_controller()
HSI: nokia-modem: Add a space character for better code readability in nokia_modem_probe()
HSI: nokia-modem: Delete error messages for a failed memory allocation in two functions
HSI: nokia-modem: Use devm_kcalloc() in nokia_modem_gpio_probe()
Diffstat (limited to 'drivers/hsi/controllers')
-rw-r--r-- | drivers/hsi/controllers/omap_ssi_core.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c index 9a29b34ed2c8..88e48b346916 100644 --- a/drivers/hsi/controllers/omap_ssi_core.c +++ b/drivers/hsi/controllers/omap_ssi_core.c @@ -384,10 +384,8 @@ static int ssi_add_controller(struct hsi_controller *ssi, int err; omap_ssi = devm_kzalloc(&ssi->device, sizeof(*omap_ssi), GFP_KERNEL); - if (!omap_ssi) { - dev_err(&pd->dev, "not enough memory for omap ssi\n"); + if (!omap_ssi) return -ENOMEM; - } err = ida_simple_get(&platform_omap_ssi_ida, 0, 0, GFP_KERNEL); if (err < 0) @@ -421,8 +419,8 @@ static int ssi_add_controller(struct hsi_controller *ssi, goto out_err; } - omap_ssi->port = devm_kzalloc(&ssi->device, - sizeof(struct omap_ssi_port *) * ssi->num_ports, GFP_KERNEL); + omap_ssi->port = devm_kcalloc(&ssi->device, ssi->num_ports, + sizeof(*omap_ssi->port), GFP_KERNEL); if (!omap_ssi->port) { err = -ENOMEM; goto out_err; @@ -467,7 +465,7 @@ static int ssi_hw_init(struct hsi_controller *ssi) dev_err(&ssi->device, "runtime PM failed %d\n", err); return err; } - /* Reseting GDD */ + /* Resetting GDD */ writel_relaxed(SSI_SWRESET, omap_ssi->gdd + SSI_GDD_GRST_REG); /* Get FCK rate in KHz */ omap_ssi->fck_rate = DIV_ROUND_CLOSEST(ssi_get_clk_rate(ssi), 1000); |