[PATCH] power_supply: rt9455_charger: Fix error reported by static analysis tool

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

 




The result of container_of macro cannot be NULL, so there is no need to
check whether info is NULL.

Signed-off-by: Anda-Maria Nicolae <anda-maria.nicolae@xxxxxxxxx>
---
 drivers/power/rt9455_charger.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/power/rt9455_charger.c b/drivers/power/rt9455_charger.c
index de86913..08baac6 100644
--- a/drivers/power/rt9455_charger.c
+++ b/drivers/power/rt9455_charger.c
@@ -1412,9 +1412,6 @@ static int rt9455_usb_event(struct notifier_block *nb,
 	unsigned int opa_mode, iaicr;
 	int ret;
 
-	if (!info)
-		return NOTIFY_DONE;
-
 	/*
 	 * Determine whether the charger is in charge mode
 	 * or in boost mode.
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux