Skip to content

Commit

Permalink
NFC: Quiet nci/data.c sparse noise about plain integer as NULL pointer
Browse files Browse the repository at this point in the history
Pointers should be cleared with NULL, not 0.

Quiets a couple sparse warnings of the type:

warning: Using plain integer as NULL pointer

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
H Hartley Sweeten authored and John W. Linville committed May 15, 2012
1 parent 51c25be commit 040487f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/nfc/nci/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void nci_data_exchange_complete(struct nci_dev *ndev, struct sk_buff *skb,

if (cb) {
ndev->data_exchange_cb = NULL;
ndev->data_exchange_cb_context = 0;
ndev->data_exchange_cb_context = NULL;

/* forward skb to nfc core */
cb(cb_context, skb, err);
Expand Down Expand Up @@ -200,10 +200,10 @@ static void nci_add_rx_data_frag(struct nci_dev *ndev,
pr_err("error adding room for accumulated rx data\n");

kfree_skb(skb);
skb = 0;
skb = NULL;

kfree_skb(ndev->rx_data_reassembly);
ndev->rx_data_reassembly = 0;
ndev->rx_data_reassembly = NULL;

err = -ENOMEM;
goto exit;
Expand All @@ -216,7 +216,7 @@ static void nci_add_rx_data_frag(struct nci_dev *ndev,

/* third, free old reassembly */
kfree_skb(ndev->rx_data_reassembly);
ndev->rx_data_reassembly = 0;
ndev->rx_data_reassembly = NULL;
}

if (pbf == NCI_PBF_CONT) {
Expand Down

0 comments on commit 040487f

Please sign in to comment.