devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anda-Maria Nicolae <anda-maria.nicolae-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] power_supply: rt9455_charger: Fix error reported by static analysis tool
Date: Fri, 12 Jun 2015 15:25:51 +0300	[thread overview]
Message-ID: <1434111951-9378-1-git-send-email-anda-maria.nicolae@intel.com> (raw)

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

             reply	other threads:[~2015-06-12 12:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 12:25 Anda-Maria Nicolae [this message]
2015-06-13  2:40 ` [PATCH] power_supply: rt9455_charger: Fix error reported by static analysis tool Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1434111951-9378-1-git-send-email-anda-maria.nicolae@intel.com \
    --to=anda-maria.nicolae-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).