diff options
author | Tushar Behera <tushar.behera@linaro.org> | 2012-11-22 03:25:16 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-12-13 04:58:42 -0500 |
commit | 69f5165ebef1d90bd58e9ce5db018218ea4d089c (patch) | |
tree | 3a26ca9d1166c6e243b621e944c86dc2873cd85e | |
parent | c1a96ebd315f82fa0f47adce264adb126cf72764 (diff) |
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>
-rw-r--r-- | drivers/usb/gadget/s3c-hsotg.c | 5 |
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) | |||
3477 | /** | 3477 | /** |
3478 | * s3c_hsotg_release - release callback for hsotg device | 3478 | * s3c_hsotg_release - release callback for hsotg device |
3479 | * @dev: Device to for which release is called | 3479 | * @dev: Device to for which release is called |
3480 | * | ||
3481 | * Nothing to do as the resource is allocated using devm_ API. | ||
3480 | */ | 3482 | */ |
3481 | static void s3c_hsotg_release(struct device *dev) | 3483 | static void s3c_hsotg_release(struct device *dev) |
3482 | { | 3484 | { |
3483 | struct s3c_hsotg *hsotg = dev_get_drvdata(dev); | ||
3484 | |||
3485 | kfree(hsotg); | ||
3486 | } | 3485 | } |
3487 | 3486 | ||
3488 | /** | 3487 | /** |