gpio: pm8xxx-gpio: remove unnecessary checks in static callbacks

Remove the parameter checks in pm_gpio_get and pm_gpio_set
callbacks because they are not necessary as callbacks of gpiolib.
This also removes an issue of NULL pointer check is after being
dereferenced.

Change-Id: Iaca83877fe93ba6335d40c9a36465f909aef2c97
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
diff --git a/drivers/gpio/pm8xxx-gpio.c b/drivers/gpio/pm8xxx-gpio.c
index cb874e8..92f697f 100644
--- a/drivers/gpio/pm8xxx-gpio.c
+++ b/drivers/gpio/pm8xxx-gpio.c
@@ -1,7 +1,7 @@
 /*
  * Qualcomm PMIC8XXX GPIO driver
  *
- * Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2011-2013, Code Aurora Forum. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -85,9 +85,6 @@
 {
 	int	mode;
 
-	if (gpio >= pm_gpio_chip->gpio_chip.ngpio || pm_gpio_chip == NULL)
-		return -EINVAL;
-
 	/* Get gpio value from config bank 1 if output gpio.
 	   Get gpio value from IRQ RT status register for all other gpio modes.
 	 */
@@ -107,9 +104,6 @@
 	u8	bank1;
 	unsigned long flags;
 
-	if (gpio >= pm_gpio_chip->gpio_chip.ngpio || pm_gpio_chip == NULL)
-		return -EINVAL;
-
 	spin_lock_irqsave(&pm_gpio_chip->pm_lock, flags);
 	bank1 = PM_GPIO_WRITE
 			| (pm_gpio_chip->bank1[gpio] & ~PM_GPIO_OUT_INVERT);