summaryrefslogtreecommitdiff
path: root/drivers/memory
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-09-15 00:17:39 +0200
committerArnd Bergmann <arnd@arndb.de>2016-09-15 00:17:39 +0200
commite747ea14de075172212823cbcb4a07a8ccd55c35 (patch)
treebd3c648103446933fcc295f70a646cbf4e35eeae /drivers/memory
parent132166589c670cd9f9a8ac7b3676f72fff35d81b (diff)
parent7922118f8f3e76eb6534e9221a6c9f496c0ae699 (diff)
Merge tag 'at91-ab-4.9-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/drivers
Pull "at91 drivers for 4.9" from Alexandre Belloni: - Coccinelle fixes for atmel-ebi and atmel-sdramc * tag 'at91-ab-4.9-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: memory: atmel-sdramc: fix a possible NULL dereference memory: atmel-ebi: use PTR_ERR_OR_ZERO() to simplify the code
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/atmel-ebi.c10
-rw-r--r--drivers/memory/atmel-sdramc.c4
2 files changed, 3 insertions, 11 deletions
diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c
index f87ad6f5d2dc..b5ed3bd082b5 100644
--- a/drivers/memory/atmel-ebi.c
+++ b/drivers/memory/atmel-ebi.c
@@ -410,10 +410,7 @@ static int at91sam9_ebi_init(struct at91_ebi *ebi)
field.reg = AT91SAM9_SMC_MODE(AT91SAM9_SMC_GENERIC);
fields->mode = devm_regmap_field_alloc(ebi->dev, ebi->smc, field);
- if (IS_ERR(fields->mode))
- return PTR_ERR(fields->mode);
-
- return 0;
+ return PTR_ERR_OR_ZERO(fields->mode);
}
static int sama5d3_ebi_init(struct at91_ebi *ebi)
@@ -441,10 +438,7 @@ static int sama5d3_ebi_init(struct at91_ebi *ebi)
field.reg = SAMA5_SMC_MODE(SAMA5_SMC_GENERIC);
fields->mode = devm_regmap_field_alloc(ebi->dev, ebi->smc, field);
- if (IS_ERR(fields->mode))
- return PTR_ERR(fields->mode);
-
- return 0;
+ return PTR_ERR_OR_ZERO(fields->mode);
}
static int at91_ebi_dev_setup(struct at91_ebi *ebi, struct device_node *np,
diff --git a/drivers/memory/atmel-sdramc.c b/drivers/memory/atmel-sdramc.c
index 53a341f3b305..12080b05e3e6 100644
--- a/drivers/memory/atmel-sdramc.c
+++ b/drivers/memory/atmel-sdramc.c
@@ -53,12 +53,10 @@ static const struct of_device_id atmel_ramc_of_match[] = {
static int atmel_ramc_probe(struct platform_device *pdev)
{
- const struct of_device_id *match;
const struct at91_ramc_caps *caps;
struct clk *clk;
- match = of_match_device(atmel_ramc_of_match, &pdev->dev);
- caps = match->data;
+ caps = of_device_get_match_data(&pdev->dev);
if (caps->has_ddrck) {
clk = devm_clk_get(&pdev->dev, "ddrck");
CWS pj57 (1.2.24); FILE MERGEDIvo Hinkelmann1-42/+23 2006/07/26 07:41:48 pjanik 1.2.24.1: #i61626#: Remove deprecated SISSL license. 2006-08-01INTEGRATION: CWS pj57 (1.3.4); FILE MERGEDIvo Hinkelmann1-40/+23 2006/07/26 08:30:16 pjanik 1.3.4.1: #i61626#: Remove deprecated SISSL license. 2006-07-13INTEGRATION: CWS latex (1.2.8); FILE MERGEDOliver Bolte1-5/+8 2006/04/06 14:54:06 sus 1.2.8.1: #i24813# Adding debug state 2005-10-24INTEGRATION: CWS lo8 (1.1.2); FILE ADDEDJens-Heiner Rechtien1-0/+745 2005/10/19 17:03:50 lo 1.1.2.3: close output when document is finished 2005/10/19 17:01:16 lo 1.1.2.2: close output when document is finished 2005/06/08 16:27:19 lo 1.1.2.1: restructuring of project and fix for #i44847# 2005-10-24INTEGRATION: CWS lo8 (1.1.2); FILE ADDEDJens-Heiner Rechtien3-0/+164 2005/06/08 16:27:18 lo 1.1.2.1: restructuring of project and fix for #i44847# 2005-10-24INTEGRATION: CWS lo8 (1.1.2); FILE ADDEDJens-Heiner Rechtien1-0/+19 2005/06/08 16:27:17 lo 1.1.2.1: restructuring of project and fix for #i44847#