Message ID | 20170630221735.GA17951@embeddedgus (mailing list archive) |
---|---|
State | Accepted |
Commit | ae1fbdff6dbcdfee9daee69fa1e7d26d1f31d1c7 |
Headers | show |
On Fri, Jun 30, 2017 at 05:17:35PM -0500, Gustavo A. R. Silva wrote: > Check return value from call to platform_get_irq(), > so in case of failure print error message and propagate > the return value. > > Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Thanks > --- > sound/soc/fsl/imx-ssi.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c > index b95132e..0679061 100644 > --- a/sound/soc/fsl/imx-ssi.c > +++ b/sound/soc/fsl/imx-ssi.c > @@ -527,6 +527,10 @@ static int imx_ssi_probe(struct platform_device *pdev) > } > > ssi->irq = platform_get_irq(pdev, 0); > + if (ssi->irq < 0) { > + dev_err(&pdev->dev, "Failed to get IRQ: %d\n", ssi->irq); > + return ssi->irq; > + } > > ssi->clk = devm_clk_get(&pdev->dev, NULL); > if (IS_ERR(ssi->clk)) { > -- > 2.5.0 >
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c index b95132e..0679061 100644 --- a/sound/soc/fsl/imx-ssi.c +++ b/sound/soc/fsl/imx-ssi.c @@ -527,6 +527,10 @@ static int imx_ssi_probe(struct platform_device *pdev) } ssi->irq = platform_get_irq(pdev, 0); + if (ssi->irq < 0) { + dev_err(&pdev->dev, "Failed to get IRQ: %d\n", ssi->irq); + return ssi->irq; + } ssi->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(ssi->clk)) {
Check return value from call to platform_get_irq(), so in case of failure print error message and propagate the return value. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> --- sound/soc/fsl/imx-ssi.c | 4 ++++ 1 file changed, 4 insertions(+)