Re: [PATCH 2/2] usb: gadget: Add test if argument pointer has a valid value in pxa27x_udc

2017-02-22 Thread Robert Jarzmik
Petr Cvek  writes:

> Move call usb_put_phy(udc->transceiver) inside a valid pointer test.
>
> Reported-by: robert.jarz...@free.fr
I'd rather have my normal signature here :
Reported-by: Robert Jarzmik 

> Signed-off-by: Petr Cvek 
Acked-by: Robert Jarzmik 

Cheers.

-- 
Robert
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] usb: gadget: Add test if argument pointer has a valid value in pxa27x_udc

2017-02-22 Thread Petr Cvek
Move call usb_put_phy(udc->transceiver) inside a valid pointer test.

Reported-by: robert.jarz...@free.fr
Signed-off-by: Petr Cvek 
---
 drivers/usb/gadget/udc/pxa27x_udc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c 
b/drivers/usb/gadget/udc/pxa27x_udc.c
index 6fa675bf2c6f..9d2e1a8aa69d 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -2531,9 +2531,10 @@ static int pxa_udc_remove(struct platform_device *_dev)
usb_del_gadget_udc(&udc->gadget);
pxa_cleanup_debugfs(udc);
 
-   if (!IS_ERR_OR_NULL(udc->transceiver))
+   if (!IS_ERR_OR_NULL(udc->transceiver)) {
usb_unregister_notifier(udc->transceiver, &pxa27x_udc_phy);
-   usb_put_phy(udc->transceiver);
+   usb_put_phy(udc->transceiver);
+   }
 
udc->transceiver = NULL;
the_controller = NULL;
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html