wan: dlci: Remove unused netdev_priv pointer
Remove occurrences of unused pointer to network device private data in functions dlci_header() and dlci_receive(). Detected by Coverity: CID 139844, CID 139845. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
310f6fd0ca
commit
a88f92b128
@@ -71,12 +71,9 @@ static int dlci_header(struct sk_buff *skb, struct net_device *dev,
|
|||||||
const void *saddr, unsigned len)
|
const void *saddr, unsigned len)
|
||||||
{
|
{
|
||||||
struct frhdr hdr;
|
struct frhdr hdr;
|
||||||
struct dlci_local *dlp;
|
|
||||||
unsigned int hlen;
|
unsigned int hlen;
|
||||||
char *dest;
|
char *dest;
|
||||||
|
|
||||||
dlp = netdev_priv(dev);
|
|
||||||
|
|
||||||
hdr.control = FRAD_I_UI;
|
hdr.control = FRAD_I_UI;
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
@@ -107,11 +104,9 @@ static int dlci_header(struct sk_buff *skb, struct net_device *dev,
|
|||||||
|
|
||||||
static void dlci_receive(struct sk_buff *skb, struct net_device *dev)
|
static void dlci_receive(struct sk_buff *skb, struct net_device *dev)
|
||||||
{
|
{
|
||||||
struct dlci_local *dlp;
|
|
||||||
struct frhdr *hdr;
|
struct frhdr *hdr;
|
||||||
int process, header;
|
int process, header;
|
||||||
|
|
||||||
dlp = netdev_priv(dev);
|
|
||||||
if (!pskb_may_pull(skb, sizeof(*hdr))) {
|
if (!pskb_may_pull(skb, sizeof(*hdr))) {
|
||||||
netdev_notice(dev, "invalid data no header\n");
|
netdev_notice(dev, "invalid data no header\n");
|
||||||
dev->stats.rx_errors++;
|
dev->stats.rx_errors++;
|
||||||
|
Reference in New Issue
Block a user