소스 검색

caif: remove duplicate initialization

"priv" is initialized twice.  I kept the second one, because it is next
to the check for NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dan Carpenter 13 년 전
부모
커밋
af2ce213f6
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      net/caif/chnl_net.c

+ 1 - 2
net/caif/chnl_net.c

@@ -72,13 +72,12 @@ static void robust_list_del(struct list_head *delete_node)
 static int chnl_recv_cb(struct cflayer *layr, struct cfpkt *pkt)
 static int chnl_recv_cb(struct cflayer *layr, struct cfpkt *pkt)
 {
 {
 	struct sk_buff *skb;
 	struct sk_buff *skb;
-	struct chnl_net *priv  = container_of(layr, struct chnl_net, chnl);
+	struct chnl_net *priv;
 	int pktlen;
 	int pktlen;
 	const u8 *ip_version;
 	const u8 *ip_version;
 	u8 buf;
 	u8 buf;
 
 
 	priv = container_of(layr, struct chnl_net, chnl);
 	priv = container_of(layr, struct chnl_net, chnl);
-
 	if (!priv)
 	if (!priv)
 		return -EINVAL;
 		return -EINVAL;