Commit e747ea14 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'at91-ab-4.9-drivers' of...

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
parents 13216658 7922118f
...@@ -410,10 +410,7 @@ static int at91sam9_ebi_init(struct at91_ebi *ebi) ...@@ -410,10 +410,7 @@ static int at91sam9_ebi_init(struct at91_ebi *ebi)
field.reg = AT91SAM9_SMC_MODE(AT91SAM9_SMC_GENERIC); field.reg = AT91SAM9_SMC_MODE(AT91SAM9_SMC_GENERIC);
fields->mode = devm_regmap_field_alloc(ebi->dev, ebi->smc, field); fields->mode = devm_regmap_field_alloc(ebi->dev, ebi->smc, field);
if (IS_ERR(fields->mode)) return PTR_ERR_OR_ZERO(fields->mode);
return PTR_ERR(fields->mode);
return 0;
} }
static int sama5d3_ebi_init(struct at91_ebi *ebi) static int sama5d3_ebi_init(struct at91_ebi *ebi)
...@@ -441,10 +438,7 @@ 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); field.reg = SAMA5_SMC_MODE(SAMA5_SMC_GENERIC);
fields->mode = devm_regmap_field_alloc(ebi->dev, ebi->smc, field); fields->mode = devm_regmap_field_alloc(ebi->dev, ebi->smc, field);
if (IS_ERR(fields->mode)) return PTR_ERR_OR_ZERO(fields->mode);
return PTR_ERR(fields->mode);
return 0;
} }
static int at91_ebi_dev_setup(struct at91_ebi *ebi, struct device_node *np, static int at91_ebi_dev_setup(struct at91_ebi *ebi, struct device_node *np,
......
...@@ -53,12 +53,10 @@ static const struct of_device_id atmel_ramc_of_match[] = { ...@@ -53,12 +53,10 @@ static const struct of_device_id atmel_ramc_of_match[] = {
static int atmel_ramc_probe(struct platform_device *pdev) static int atmel_ramc_probe(struct platform_device *pdev)
{ {
const struct of_device_id *match;
const struct at91_ramc_caps *caps; const struct at91_ramc_caps *caps;
struct clk *clk; struct clk *clk;
match = of_match_device(atmel_ramc_of_match, &pdev->dev); caps = of_device_get_match_data(&pdev->dev);
caps = match->data;
if (caps->has_ddrck) { if (caps->has_ddrck) {
clk = devm_clk_get(&pdev->dev, "ddrck"); clk = devm_clk_get(&pdev->dev, "ddrck");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment