Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1679141
| From | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] pata_imx: print error message on platform_get_irq failure |
| Date | 2017-06-30 23:40 +0200 |
| Message-ID | <tYbNT-2ht-7@gated-at.bofh.it> (permalink) |
| References | <tYbNT-2ht-5@gated-at.bofh.it> |
| Organization | Cogent Embedded |
On 07/01/2017 12:30 AM, Gustavo A. R. Silva wrote:
> Print error message on platform_get_irq failure before return.
>
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
> Changes in v2:
> Print the return value of platform_get_irq on failure.
>
> drivers/ata/pata_imx.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c
> index d4caa23..66fb1ab 100644
> --- a/drivers/ata/pata_imx.c
> +++ b/drivers/ata/pata_imx.c
> @@ -132,9 +132,10 @@ static int pata_imx_probe(struct platform_device *pdev)
> int ret;
>
> irq = platform_get_irq(pdev, 0);
> - if (irq < 0)
> + if (irq < 0) {
> + dev_err(&pdev->dev, "failed to get IRQ: %d\n", irq);
> return irq;
> -
> + }
Removing empty line here doesn't seem a good idea...
> priv = devm_kzalloc(&pdev->dev,
> sizeof(struct pata_imx_priv), GFP_KERNEL);
> if (!priv)
MBR, Sergei
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH v2] pata_imx: print error message on platform_get_irq failure Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2017-06-30 23:40 +0200
Re: [PATCH v2] pata_imx: print error message on platform_get_irq failure "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-30 23:50 +0200
[PATCH v3] pata_imx: print error message on platform_get_irq failure "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-07-01 00:10 +0200
csiph-web