[PATCH v3 08/10] ata: pata_platform: Drop validating num_resources count

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Drop validating num_resources count as pata_platform_get_resources()
already does this check for us.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
---
v2-->v3
* New patch
---
 drivers/ata/pata_platform.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
index 4273f1a9abd2..88a9bdc81e68 100644
--- a/drivers/ata/pata_platform.c
+++ b/drivers/ata/pata_platform.c
@@ -265,14 +265,6 @@ static int pata_platform_get_pdata(struct platform_device *pdev,
 	struct pata_platform_info *pp_info = dev_get_platdata(&pdev->dev);
 	int ret;
 
-	/*
-	 * Simple resource validation ..
-	 */
-	if ((pdev->num_resources != 3) && (pdev->num_resources != 2)) {
-		dev_err(&pdev->dev, "invalid number of resources\n");
-		return -EINVAL;
-	}
-
 	ret = pata_platform_get_resources(pdev, priv);
 	if (ret)
 		return ret;
-- 
2.17.1




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux