Skip to content

Commit

Permalink
net: netcp: Fix an error message
Browse files Browse the repository at this point in the history
[ Upstream commit ddb6e00 ]

'ret' is known to be 0 here.
The expected error code is stored in 'tx_pipe->dma_queue', so use it
instead.

While at it, switch from %d to %pe which is more user friendly.

Fixes: 84640e2 ("net: netcp: Add Keystone NetCP core ethernet driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
tititiou36 authored and gregkh committed Jun 3, 2021
1 parent 1354ec8 commit d5b0a15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/ti/netcp_core.c
Expand Up @@ -1350,8 +1350,8 @@ int netcp_txpipe_open(struct netcp_tx_pipe *tx_pipe)
tx_pipe->dma_queue = knav_queue_open(name, tx_pipe->dma_queue_id,
KNAV_QUEUE_SHARED);
if (IS_ERR(tx_pipe->dma_queue)) {
dev_err(dev, "Could not open DMA queue for channel \"%s\": %d\n",
name, ret);
dev_err(dev, "Could not open DMA queue for channel \"%s\": %pe\n",
name, tx_pipe->dma_queue);
ret = PTR_ERR(tx_pipe->dma_queue);
goto err;
}
Expand Down

0 comments on commit d5b0a15

Please sign in to comment.