summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-07-23 15:21:39 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-07-23 15:21:39 +1000
commitd5e748ff2b996d83489ac76c072e8b99f9ecef13 (patch)
treee2dfdf187d2200898be728b97a31843f3fc26808 /drivers/ide/ide-probe.c
parentfea9cf321c916e9372874e6f2af1bf0b5beb89fb (diff)
parenta7ca13826e478f9b201eb2f9f20de0b978a82ad9 (diff)
downloadtalos-op-linux-d5e748ff2b996d83489ac76c072e8b99f9ecef13.tar.gz
talos-op-linux-d5e748ff2b996d83489ac76c072e8b99f9ecef13.zip
Merge remote-tracking branch 'gpio/ib-aspeed' into upstream-ready
Merge the GPIO tree "ib-aspeed" topic branch which contains pre-requisites for subsequent changes. This branch is also in gpio "next".
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r--drivers/ide/ide-probe.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 56d7bc228cb3..416a2f353071 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -985,8 +985,9 @@ static int hwif_init(ide_hwif_t *hwif)
if (!hwif->sg_max_nents)
hwif->sg_max_nents = PRD_ENTRIES;
- hwif->sg_table = kmalloc(sizeof(struct scatterlist)*hwif->sg_max_nents,
- GFP_KERNEL);
+ hwif->sg_table = kmalloc_array(hwif->sg_max_nents,
+ sizeof(struct scatterlist),
+ GFP_KERNEL);
if (!hwif->sg_table) {
printk(KERN_ERR "%s: unable to allocate SG table.\n", hwif->name);
goto out;
OpenPOWER on IntegriCloud