[PATCH RFC 1/3] usb: phy: fix the error check

2012-09-13 Thread Shubhrajyoti D
The functions pm_runtime_get_sync and clk_enable return a signed value. So the variable used to store should be signed otherwise a negative value may be wrongly interpreted. While at it also remove the initialisation of ret to zero. Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com --- untested

[PATCH RFC 2/3] usb: twl6030: fix the error check for omap_usb2_set_comparator

2012-09-13 Thread Shubhrajyoti D
The function omap_usb2_set_comparator may return -ENODEV. Use a signed variable to store and check so that the value is not wrongly interpreted as a large positive number. While at it lets use the err variable to do the same. Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com --- untested

[PATCH RFC 3/3] usb: twl6030: remove the twl6030_readb function

2012-09-13 Thread Shubhrajyoti D
Currently upon the read errors twl6030_readb returns a negative number. The return value may be wrongly interpreted as the read value. Call twl_i2c_read_u8 directly and in case of errors return thus preventing a possible spurious detection. Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com

[PATCH v1] usb: musb: Make dma_controller_create __devinit

2012-08-09 Thread Shubhrajyoti D
.init.text:dma_controller_create() The function __devinit musb_init_controller() references a function __init dma_controller_create(). If dma_controller_create is only used by musb_init_controller then annotate dma_controller_create with a matching annotation. Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com

[PATCH RFC] usb: musb: Prevent the masking of the return value

2012-08-07 Thread Shubhrajyoti D
Currently the errors returned by fifo_setup get masked by EINVAL, propagate the same to the caller. Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com --- drivers/usb/musb/musb_core.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers

[PATCH RFC] usb: otg: Remove the unneeded NULL check

2012-08-07 Thread Shubhrajyoti D
The function usb_add_phy trusts the sanity of the caller. Also it accesses x after the NULL check. Remove the unneeded check. Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com --- drivers/usb/otg/otg.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/otg