diff mbox series

[1/2] ata: delete redundant printing of return value

Message ID 1615621644-1657-1-git-send-email-wangqing@vivo.com
State New
Headers show
Series [1/2] ata: delete redundant printing of return value | expand

Commit Message

王擎 March 13, 2021, 7:47 a.m. UTC
platform_get_irq() has already checked and printed the return value, 
the printing here is nothing special, it is not necessary at all.

Signed-off-by: Wang Qing <wangqing@vivo.com>
---
 drivers/ata/sata_highbank.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Sergei Shtylyov March 13, 2021, 10:16 a.m. UTC | #1
Hello again. :-)

   Now, 2 patches to the different files shouldn't have and identical subject! And the patch
subject should reflect the exact patch locus, e.g. "sata_highbank: delete redundant printing
of return value".

On 3/13/21 10:47 AM, Wang Qing wrote:

> platform_get_irq() has already checked and printed the return value, 
> the printing here is nothing special, it is not necessary at all.
> 
> Signed-off-by: Wang Qing <wangqing@vivo.com>
> ---
>  drivers/ata/sata_highbank.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
> index 64b2ef1..a43d42a
> --- a/drivers/ata/sata_highbank.c
> +++ b/drivers/ata/sata_highbank.c
> @@ -469,10 +469,8 @@ static int ahci_highbank_probe(struct platform_device *pdev)
>  	}
>  
>  	irq = platform_get_irq(pdev, 0);
> -	if (irq <= 0) {
> -		dev_err(dev, "no irq\n");
> +	if (irq <= 0)
>  		return -EINVAL;
> -	}

   Again, this code has more serious issue: it breaks deferred probing by 
overriding the result to -EINVAL...

MBR, Sergei
diff mbox series

Patch

diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
index 64b2ef1..a43d42a
--- a/drivers/ata/sata_highbank.c
+++ b/drivers/ata/sata_highbank.c
@@ -469,10 +469,8 @@  static int ahci_highbank_probe(struct platform_device *pdev)
 	}
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0) {
-		dev_err(dev, "no irq\n");
+	if (irq <= 0)
 		return -EINVAL;
-	}
 
 	hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
 	if (!hpriv) {