diff options
author | Denis Efremov <efremov@linux.com> | 2020-06-05 22:11:44 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-05 13:22:49 -0700 |
commit | 7f89cc07d22a4152f3c649a89aa8fe240effd24a (patch) | |
tree | 3ece95775e4247f99c775754a07d51209e7cab6f /drivers/net/ethernet/chelsio | |
parent | 6da95b52b8ea4944ed1e596ee6db176ee83ddbeb (diff) | |
download | linux-stable-7f89cc07d22a4152f3c649a89aa8fe240effd24a.tar.gz linux-stable-7f89cc07d22a4152f3c649a89aa8fe240effd24a.tar.bz2 linux-stable-7f89cc07d22a4152f3c649a89aa8fe240effd24a.zip |
cxgb4: Use kfree() instead kvfree() where appropriate
Use kfree(buf) in blocked_fl_read() because the memory is allocated with
kzalloc(). Use kfree(t) in blocked_fl_write() because the memory is
allocated with kcalloc().
Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c index 41315712deb8..828499256004 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c @@ -3357,7 +3357,7 @@ static ssize_t blocked_fl_read(struct file *filp, char __user *ubuf, adap->sge.egr_sz, adap->sge.blocked_fl); len += sprintf(buf + len, "\n"); size = simple_read_from_buffer(ubuf, count, ppos, buf, len); - kvfree(buf); + kfree(buf); return size; } @@ -3374,12 +3374,12 @@ static ssize_t blocked_fl_write(struct file *filp, const char __user *ubuf, err = bitmap_parse_user(ubuf, count, t, adap->sge.egr_sz); if (err) { - kvfree(t); + kfree(t); return err; } bitmap_copy(adap->sge.blocked_fl, t, adap->sge.egr_sz); - kvfree(t); + kfree(t); return count; } |