Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfb9e4c4 authored by Fabio Estevam's avatar Fabio Estevam Committed by Thierry Reding
Browse files

pwm: mxs: Check the return value from stmp_reset_block()



stmp_reset_block() may fail, so let's check its return value and
propagate it in the case of error.

Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 9da01759
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -161,9 +161,15 @@ static int mxs_pwm_probe(struct platform_device *pdev)


	platform_set_drvdata(pdev, mxs);
	platform_set_drvdata(pdev, mxs);


	stmp_reset_block(mxs->base);
	ret = stmp_reset_block(mxs->base);
	if (ret)
		goto pwm_remove;


	return 0;
	return 0;

pwm_remove:
	pwmchip_remove(&mxs->chip);
	return ret;
}
}


static int mxs_pwm_remove(struct platform_device *pdev)
static int mxs_pwm_remove(struct platform_device *pdev)