mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
thermal: imx: save one condition block for normal case of nvmem initialization
Put return value checks of calling imx_init_from_nvmem_cells() into one block to save one condition block for normal case. Signed-off-by: Anson Huang <[email protected]> Acked-by: Viresh Kumar <[email protected]> Reviewed-by: Daniel Lezcano <[email protected]> Signed-off-by: Eduardo Valentin <[email protected]>
This commit is contained in:
parent
c589c56671
commit
925b383618
1 changed files with 3 additions and 2 deletions
|
|
@ -742,9 +742,10 @@ static int imx_thermal_probe(struct platform_device *pdev)
|
|||
|
||||
if (of_find_property(pdev->dev.of_node, "nvmem-cells", NULL)) {
|
||||
ret = imx_init_from_nvmem_cells(pdev);
|
||||
if (ret == -EPROBE_DEFER)
|
||||
return ret;
|
||||
if (ret) {
|
||||
if (ret == -EPROBE_DEFER)
|
||||
return ret;
|
||||
|
||||
dev_err(&pdev->dev, "failed to init from nvmem: %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue