BZ: 22932
The function checks for null and then makes a dereference
of the same pointer. This is a no-no.
Change-Id: I30e10396e13f5f69cfe5a01d30526c840286da08
Signed-off-by: Axel Haslam <axelx.haslam@intel.com>
Reviewed-on: http://android.intel.com:8080/34277
Reviewed-by: Koskinen, Ilkka <ilkka.koskinen@intel.com>
Reviewed-by: Yang, Bin <bin.yang@intel.com>
Reviewed-by: Li, Ning <ning.li@intel.com>
Reviewed-by: Fiat, Christophe <christophe.fiat@intel.com>
Tested-by: Wang, Zhifeng <zhifeng.wang@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
/* use this trick to get memio */
lnw = irq_get_chip_data(gpio_to_irq(gpio));
if (!lnw) {
- dev_err(lnw->chip.dev, "langwell_gpio: can not find pin %d\n", gpio);
+ pr_err("langwell_gpio: can not find pin %d\n", gpio);
return;
}
if (gpio < lnw->chip.base || gpio >= lnw->chip.base + lnw->chip.ngpio) {