From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: wulf-TNX95d0MmH7DzftRWevZcw@public.gmane.org
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: [bug report] phy: rockchip-inno-usb2: support otg-port for rk3399
Date: Thu, 17 Nov 2016 14:04:57 +0300 [thread overview]
Message-ID: <20161117110456.GA10885@mwanda> (raw)
Hello William Wu,
The patch 0c42fe48fd23: "phy: rockchip-inno-usb2: support otg-port
for rk3399" from Nov 7, 2016, leads to the following static checker
warning:
drivers/phy/phy-rockchip-inno-usb2.c:998 rockchip_usb2phy_otg_port_init()
warn: 'rphy->edev' isn't an ERR_PTR
drivers/phy/phy-rockchip-inno-usb2.c
989 ret = devm_request_threaded_irq(rphy->dev, rport->bvalid_irq, NULL,
990 rockchip_usb2phy_bvalid_irq,
991 IRQF_ONESHOT,
992 "rockchip_usb2phy_bvalid", rport);
993 if (ret) {
994 dev_err(rphy->dev, "failed to request otg-bvalid irq handle\n");
995 goto out;
996 }
997
998 if (!IS_ERR(rphy->edev)) {
I think the static checker is correct that this check should be removed.
The rest of the code assumes ->edev is a valid pointer.
999 rport->event_nb.notifier_call = rockchip_otg_event;
1000
1001 ret = extcon_register_notifier(rphy->edev, EXTCON_USB_HOST,
1002 &rport->event_nb);
1003 if (ret)
1004 dev_err(rphy->dev, "register USB HOST notifier failed\n");
1005 }
1006
1007 out:
1008 return ret;
1009 }
regards,
dan carpenter
next reply other threads:[~2016-11-17 11:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-17 11:04 Dan Carpenter [this message]
2016-11-22 9:16 ` [bug report] phy: rockchip-inno-usb2: support otg-port for rk3399 wlf
[not found] ` <81fc5933-7bee-2d83-f8ef-a951355c4248-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-11-25 11:18 ` [patch] phy: rockchip-inno-usb2: remove an unneeded check Dan Carpenter
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=20161117110456.GA10885@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=wulf-TNX95d0MmH7DzftRWevZcw@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