Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755255AbbFLMWX (ORCPT ); Fri, 12 Jun 2015 08:22:23 -0400 Received: from mga09.intel.com ([134.134.136.24]:7482 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752842AbbFLMWU (ORCPT ); Fri, 12 Jun 2015 08:22:20 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,601,1427785200"; d="scan'208";a="742111395" From: Anda-Maria Nicolae To: sre@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH] power_supply: rt9455_charger: Fix error reported by static analysis tool Date: Fri, 12 Jun 2015 15:25:51 +0300 Message-Id: <1434111951-9378-1-git-send-email-anda-maria.nicolae@intel.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 926 Lines: 30 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 --- 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 linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/