This is a note to let you know that I've just added the patch titled
usb: chipidea: fix static checker warning for NULL pointer
to my usb git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 8ff396fe56f5593640a8ce7223cac33a2cda619e Mon Sep 17 00:00:00 2001
From: Peter Chen peter.chen@nxp.com Date: Thu, 17 Jan 2019 09:24:20 +0000 Subject: usb: chipidea: fix static checker warning for NULL pointer
During the static checker, "data->usbmisc_data" may be NULL. Fix it by adding this pointer judgement before using.
Reported-by: Dan Carpenter dan.carpenter@oracle.com Signed-off-by: Peter Chen peter.chen@nxp.com Cc: stable stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org --- drivers/usb/chipidea/ci_hdrc_imx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index e81de9ca8729..9b45aa422e69 100644 --- a/drivers/usb/chipidea/ci_hdrc_imx.c +++ b/drivers/usb/chipidea/ci_hdrc_imx.c @@ -316,7 +316,8 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) if (IS_ERR(data->usbmisc_data)) return PTR_ERR(data->usbmisc_data);
- if (of_usb_get_phy_mode(dev->of_node) == USBPHY_INTERFACE_MODE_HSIC) { + if ((of_usb_get_phy_mode(dev->of_node) == USBPHY_INTERFACE_MODE_HSIC) + && data->usbmisc_data) { pdata.flags |= CI_HDRC_IMX_IS_HSIC; data->usbmisc_data->hsic = 1; data->pinctrl = devm_pinctrl_get(dev);
This is a note to let you know that I've just added the patch titled
usb: chipidea: fix static checker warning for NULL pointer
to my usb git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Hi Greg,
This patch does not need to go stable tree, this issue is introduced by v5.0-rc1. Thanks.
Peter
From 8ff396fe56f5593640a8ce7223cac33a2cda619e Mon Sep 17 00:00:00 2001 From: Peter Chen peter.chen@nxp.com Date: Thu, 17 Jan 2019 09:24:20 +0000 Subject: usb: chipidea: fix static checker warning for NULL pointer
During the static checker, "data->usbmisc_data" may be NULL. Fix it by adding this pointer judgement before using.
Reported-by: Dan Carpenter dan.carpenter@oracle.com Signed-off-by: Peter Chen peter.chen@nxp.com Cc: stable stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
drivers/usb/chipidea/ci_hdrc_imx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index e81de9ca8729..9b45aa422e69 100644 --- a/drivers/usb/chipidea/ci_hdrc_imx.c +++ b/drivers/usb/chipidea/ci_hdrc_imx.c @@ -316,7 +316,8 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) if (IS_ERR(data->usbmisc_data)) return PTR_ERR(data->usbmisc_data);
- if (of_usb_get_phy_mode(dev->of_node) ==
USBPHY_INTERFACE_MODE_HSIC) {
- if ((of_usb_get_phy_mode(dev->of_node) ==
USBPHY_INTERFACE_MODE_HSIC)
pdata.flags |= CI_HDRC_IMX_IS_HSIC; data->usbmisc_data->hsic = 1; data->pinctrl = devm_pinctrl_get(dev);&& data->usbmisc_data) {
-- 2.20.1
On Mon, Jan 21, 2019 at 05:29:19AM +0000, Peter Chen wrote:
This is a note to let you know that I've just added the patch titled
usb: chipidea: fix static checker warning for NULL pointer
to my usb git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Hi Greg,
This patch does not need to go stable tree, this issue is introduced by v5.0-rc1.
Next time please add a "Fixes:" tag so that it is more obvious :(
thanks,
greg k-h
usb: chipidea: fix static checker warning for NULL pointer
to my usb git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Hi Greg,
This patch does not need to go stable tree, this issue is introduced by v5.0-rc1.
Next time please add a "Fixes:" tag so that it is more obvious :(
thanks,
Sorry, I will do it next time.
Peter
linux-stable-mirror@lists.linaro.org