[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140508225718.GA24276@devel.8.8.4.4>
Date: Fri, 9 May 2014 07:57:18 +0900
From: Daeseok Youn <daeseok.youn@...il.com>
To: m.chehab@...sung.com
Cc: sakari.ailus@....fi, linux-dev@...soray.com,
hans.verkuil@...co.com, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] [media] s2255drv: fix memory leak s2255_probe()
smatch says:
drivers/media/usb/s2255/s2255drv.c:2246 s2255_probe() warn:
possible memory leak of 'dev'
Signed-off-by: Daeseok Youn <daeseok.youn@...il.com>
---
V2: use the same pattern for error handling.
drivers/media/usb/s2255/s2255drv.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c
index 1d4ba2b..3193474 100644
--- a/drivers/media/usb/s2255/s2255drv.c
+++ b/drivers/media/usb/s2255/s2255drv.c
@@ -2243,7 +2243,7 @@ static int s2255_probe(struct usb_interface *interface,
dev->cmdbuf = kzalloc(S2255_CMDBUF_SIZE, GFP_KERNEL);
if (dev->cmdbuf == NULL) {
s2255_dev_err(&interface->dev, "out of memory\n");
- return -ENOMEM;
+ goto errorFWDATA1;
}
atomic_set(&dev->num_channels, 0);
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists