All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] power_supply: rt9455_charger: Fix error reported by static analysis tool
@ 2015-06-12 12:25 ` Anda-Maria Nicolae
  0 siblings, 0 replies; 3+ messages in thread
From: Anda-Maria Nicolae @ 2015-06-12 12:25 UTC (permalink / raw)
  To: sre, linux-pm, linux-kernel, devicetree

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@intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] power_supply: rt9455_charger: Fix error reported by static analysis tool
@ 2015-06-12 12:25 ` Anda-Maria Nicolae
  0 siblings, 0 replies; 3+ messages in thread
From: Anda-Maria Nicolae @ 2015-06-12 12:25 UTC (permalink / raw)
  To: sre-DgEjT+Ai2ygdnm+yROfE0A, linux-pm-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA

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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] power_supply: rt9455_charger: Fix error reported by static analysis tool
  2015-06-12 12:25 ` Anda-Maria Nicolae
  (?)
@ 2015-06-13  2:40 ` Sebastian Reichel
  -1 siblings, 0 replies; 3+ messages in thread
From: Sebastian Reichel @ 2015-06-13  2:40 UTC (permalink / raw)
  To: Anda-Maria Nicolae; +Cc: linux-pm, linux-kernel, devicetree

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

Hi,

On Fri, Jun 12, 2015 at 03:25:51PM +0300, Anda-Maria Nicolae wrote:
> The result of container_of macro cannot be NULL, so there is no need to
> check whether info is NULL.

Thanks, queued for 4.2.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-13  2:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-12 12:25 [PATCH] power_supply: rt9455_charger: Fix error reported by static analysis tool Anda-Maria Nicolae
2015-06-12 12:25 ` Anda-Maria Nicolae
2015-06-13  2:40 ` Sebastian Reichel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.