summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/s3c-hsotg.c
diff options
context:
space:
mode:
authorTushar Behera <tushar.behera@linaro.org>2012-11-22 13:55:16 +0530
committerFelipe Balbi <balbi@ti.com>2012-12-13 11:58:42 +0200
commit69f5165ebef1d90bd58e9ce5db018218ea4d089c (patch)
tree3a26ca9d1166c6e243b621e944c86dc2873cd85e /drivers/usb/gadget/s3c-hsotg.c
parentc1a96ebd315f82fa0f47adce264adb126cf72764 (diff)
downloadblackbird-op-linux-69f5165ebef1d90bd58e9ce5db018218ea4d089c.tar.gz
blackbird-op-linux-69f5165ebef1d90bd58e9ce5db018218ea4d089c.zip
usb: gadget: s3c-hsotg: Fix invalid free of devm_ allocated data
Since hsotg object is allocated using devm_kzalloc() API, there is no need to free this explicitly. But we need to keep the release API to prevent warnings. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/s3c-hsotg.c')
-rw-r--r--drivers/usb/gadget/s3c-hsotg.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
index 141971d9051e..439c3f972f8c 100644
--- a/drivers/usb/gadget/s3c-hsotg.c
+++ b/drivers/usb/gadget/s3c-hsotg.c
@@ -3477,12 +3477,11 @@ static void s3c_hsotg_delete_debug(struct s3c_hsotg *hsotg)
/**
* s3c_hsotg_release - release callback for hsotg device
* @dev: Device to for which release is called
+ *
+ * Nothing to do as the resource is allocated using devm_ API.
*/
static void s3c_hsotg_release(struct device *dev)
{
- struct s3c_hsotg *hsotg = dev_get_drvdata(dev);
-
- kfree(hsotg);
}
/**
OpenPOWER on IntegriCloud