Checks for Null value in function *get_skub
Subsystems (2)
PATCH v2 1/1 Checks for Null value in function *get_skub
Signed-off-by Nicholas Krause <[email protected]>
--- drivers/infiniband/hw/cxgb4/cm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/infiniband/hw/cxgb4/cm.c +2 -0
@@ -340,15 +340,13 @@ static int status2errno(int status)*/ static struct sk_buff *get_skb (struct sk_buff *skb,int len,gfp_t gfp) {if (skb && !skb_is_nonlinear (skb) && !skb_cloned (skb)) {skb_trim (skb,0 );skb_get (skb);skb_reset_transport_header (skb); }else { +if (!skb) +kfree (skb); skb =alloc_skb (len, gfp); }t4_set_arp_err_handler (skb,NULL ,NULL );
Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 13 lines · Nicholas Krause
Signed-off-by Nicholas Krause <[email protected]>--- drivers/infiniband/hw/cxgb4/cm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)drivers/infiniband/hw/cxgb4/cm.c +0
-0@@ -340,15 +340,13 @@ static int status2errno(int status)*/ static struct sk_buff *get_skb (struct sk_buff *skb,int len,gfp_t gfp) {
drivers/infiniband/hw/cxgb4/cm.c static int status2errno(int status) · line 352
Quoted 10 lines
drivers/infiniband/hw/cxgb4/cm.c +2
-0if (skb && !skb_is_nonlinear (skb) && !skb_cloned (skb)) {skb_trim (skb,0 );skb_get (skb);skb_reset_transport_header (skb); }else { +if (!skb) +kfree (skb); skb =alloc_skb (len, gfp); }t4_set_arp_err_handler (skb,NULL ,NULL );
Should be 'if (skb)'
:)
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html