Message ID | 1512056616-21065-3-git-send-email-arvind.yadav.cs@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Nov 30, 2017 at 09:13:35PM +0530, Arvind Yadav wrote: > platform_get_irq() can fail here and we must check its return value. > > Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> > --- > drivers/staging/irda/drivers/pxaficp_ir.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) Did you read drivers/staging/irda/TODO? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Greg, On Thursday 30 November 2017 10:11 PM, Greg KH wrote: > On Thu, Nov 30, 2017 at 09:13:35PM +0530, Arvind Yadav wrote: >> platform_get_irq() can fail here and we must check its return value. >> >> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> >> --- >> drivers/staging/irda/drivers/pxaficp_ir.c | 10 ++++++++++ >> 1 file changed, 10 insertions(+) > Did you read drivers/staging/irda/TODO? Sorry, Now I have read it. :( > > thanks, > > greg k-h Thanks, ~arvind -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/staging/irda/drivers/pxaficp_ir.c b/drivers/staging/irda/drivers/pxaficp_ir.c index 1dba16b..a97ce04 100644 --- a/drivers/staging/irda/drivers/pxaficp_ir.c +++ b/drivers/staging/irda/drivers/pxaficp_ir.c @@ -960,7 +960,17 @@ static int pxa_irda_probe(struct platform_device *pdev) si->irda_base = ficp; si->stuart_base = stuart; si->uart_irq = platform_get_irq(pdev, 0); + if (si->uart_irq < 0) { + err = si->uart_irq; + goto err_mem_1; + } + si->icp_irq = platform_get_irq(pdev, 1); + if (si->icp_irq < 0) { + err = si->icp_irq; + goto err_mem_1; + } + si->sir_clk = devm_clk_get(&pdev->dev, "UARTCLK"); si->fir_clk = devm_clk_get(&pdev->dev, "FICPCLK");
platform_get_irq() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> --- drivers/staging/irda/drivers/pxaficp_ir.c | 10 ++++++++++ 1 file changed, 10 insertions(+)