2015-09-25 07:59:18

by Mutharaju, Prasanna (P.)

[permalink] [raw]
Subject: [PATCH] Bluetooth:bluecard: Comparison to NULL could be re-written

From: Prasanna Karthik <[email protected]>

replaced 'not null' comparison that is readable, reported by checkpatch.

Signed-off-by: Prasanna Karthik <[email protected]>
---
drivers/bluetooth/bluecard_cs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_c=
s.c
index 35e63aa..25b7166 100644
--- a/drivers/bluetooth/bluecard_cs.c
+++ b/drivers/bluetooth/bluecard_cs.c
@@ -390,7 +390,7 @@ static void bluecard_receive(struct bluecard_info *info=
,
for (i =3D 0; i < len; i++) {
=20
/* Allocate packet */
- if (info->rx_skb =3D=3D NULL) {
+ if (!info->rx_skb) {
info->rx_state =3D RECV_WAIT_PACKET_TYPE;
info->rx_count =3D 0;
info->rx_skb =3D bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC);
--=20
1.9.1


2015-09-25 08:20:15

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth:bluecard: Comparison to NULL could be re-written

Hi Prasanna,

> replaced 'not null' comparison that is readable, reported by checkpatch.
>
> Signed-off-by: Prasanna Karthik <[email protected]>
> ---
> drivers/bluetooth/bluecard_cs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel