summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-amlogic-spisg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi-amlogic-spisg.c')
-rw-r--r--drivers/spi/spi-amlogic-spisg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-amlogic-spisg.c b/drivers/spi/spi-amlogic-spisg.c
index 2ab8bdf2a676..bcd7ec291ad0 100644
--- a/drivers/spi/spi-amlogic-spisg.c
+++ b/drivers/spi/spi-amlogic-spisg.c
@@ -662,7 +662,7 @@ static int aml_spisg_clk_init(struct spisg_device *spisg, void __iomem *base)
clk_disable_unprepare(spisg->pclk);
- tbl = devm_kzalloc(dev, sizeof(struct clk_div_table) * (DIV_NUM + 1), GFP_KERNEL);
+ tbl = devm_kcalloc(dev, (DIV_NUM + 1), sizeof(*tbl), GFP_KERNEL);
if (!tbl)
return -ENOMEM;
@@ -733,7 +733,7 @@ static int aml_spisg_probe(struct platform_device *pdev)
else
ctlr = spi_alloc_host(dev, sizeof(*spisg));
if (!ctlr)
- return dev_err_probe(dev, -ENOMEM, "controller allocation failed\n");
+ return -ENOMEM;
spisg = spi_controller_get_devdata(ctlr);
spisg->controller = ctlr;