[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1650607607-22893-1-git-send-email-baihaowen@meizu.com>
Date: Fri, 22 Apr 2022 14:06:47 +0800
From: Haowen Bai <baihaowen@...zu.com>
To: Mauro Carvalho Chehab <mchehab@...nel.org>
CC: Haowen Bai <baihaowen@...zu.com>, <linux-media@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH] media: m920x: Remove useless kfree
After alloc fail, we do not need to kfree.
Signed-off-by: Haowen Bai <baihaowen@...zu.com>
---
drivers/media/usb/dvb-usb/m920x.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/media/usb/dvb-usb/m920x.c b/drivers/media/usb/dvb-usb/m920x.c
index 548199cd86f6..9df0ccfb654b 100644
--- a/drivers/media/usb/dvb-usb/m920x.c
+++ b/drivers/media/usb/dvb-usb/m920x.c
@@ -277,7 +277,6 @@ static int m920x_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int nu
char *read = kmalloc(1, GFP_KERNEL);
if (!read) {
ret = -ENOMEM;
- kfree(read);
goto unlock;
}
--
2.7.4
Powered by blists - more mailing lists