diff options
author | Nam Cao <namcaov@gmail.com> | 2022-09-09 12:06:51 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-09-11 13:56:52 +0200 |
commit | 9ca57c63fa0600b1bfdcc4996f2b5795339da7ce (patch) | |
tree | 1292e709d3e2a3e3d498ec916f0540599ce90e00 /drivers/staging/vt6655 | |
parent | a90044ef5605bc0961356548526c44964bc819a7 (diff) | |
download | lwn-9ca57c63fa0600b1bfdcc4996f2b5795339da7ce.tar.gz lwn-9ca57c63fa0600b1bfdcc4996f2b5795339da7ce.zip |
staging: vt6655: remove unnecessary null check
Remove null check for priv->tx0_bufs, because it can never be null at
this point.
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/20220909100650.44609-1-namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655')
-rw-r--r-- | drivers/staging/vt6655/device_main.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 3397c78b975a..0d8876278953 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -586,13 +586,12 @@ static void device_free_rings(struct vnt_private *priv) priv->opts.tx_descs[1] * sizeof(struct vnt_tx_desc), priv->aRD0Ring, priv->pool_dma); - if (priv->tx0_bufs) - dma_free_coherent(&priv->pcid->dev, - priv->opts.tx_descs[0] * PKT_BUF_SZ + - priv->opts.tx_descs[1] * PKT_BUF_SZ + - CB_BEACON_BUF_SIZE + - CB_MAX_BUF_SIZE, - priv->tx0_bufs, priv->tx_bufs_dma0); + dma_free_coherent(&priv->pcid->dev, + priv->opts.tx_descs[0] * PKT_BUF_SZ + + priv->opts.tx_descs[1] * PKT_BUF_SZ + + CB_BEACON_BUF_SIZE + + CB_MAX_BUF_SIZE, + priv->tx0_bufs, priv->tx_bufs_dma0); } static int device_init_rd0_ring(struct vnt_private *priv) |