Skip to contentSkip to conversation

infiniband/cxgb4: remove unneeded assignment

PATCH Applied Dan Carpenter 3 participants 4 messages May 31, 2010 – Jul 19, 2010 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 infiniband/cxgb4: remove unneeded assignment

We don't need to assign rpl here, we do that later on.

drivers/infiniband/hw/cxgb4/cm.c +1 -1
index 30ce0a8..60b5beb 100644
@@ -2242,7 +2242,7 @@ static void process_work(struct work_struct *work)
 {
 	struct sk_buff *skb = NULL;
 	struct c4iw_dev *dev;
-	struct cpl_act_establish *rpl = cplhdr(skb);
+	struct cpl_act_establish *rpl;
 	unsigned int opcode;
 	int ret;
 
#1 lore raw

Looks fine to me... in fact I don't see how this could have avoided a NULL deref here unless the compiler is already optimizing out this assignment, since two lines above is

struct sk_buff *skb = NULL;

before we do

- struct cpl_act_establish *rpl = cplhdr(skb);

Steve?

Signature · 2 lines
Roland Dreier <[email protected]> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html

A message that is not in the archive (sent off-list or not yet received): adaiq61qesj.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org

#3 lore raw
Quoted 10 lines · Roland Dreier

Looks fine to me... in fact I don't see how this could have avoided a NULL deref here unless the compiler is already optimizing out this assignment, since two lines above is

struct sk_buff *skb = NULL;

before we do

drivers/infiniband/hw/cxgb4/cm.c +0 -1
-	struct cpl_act_establish *rpl = cplhdr(skb);
Quoted 2 lines

Steve?

Looks ok.