Commit 387847f2 authored by Peng Li's avatar Peng Li Committed by David S. Miller

net: hdlc: replace comparison to NULL with "!param"

According to the chackpatch.pl, comparison to NULL could
be written "!param".
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 01506939
...@@ -148,7 +148,7 @@ int hdlc_open(struct net_device *dev) ...@@ -148,7 +148,7 @@ int hdlc_open(struct net_device *dev)
hdlc->carrier, hdlc->open); hdlc->carrier, hdlc->open);
#endif #endif
if (hdlc->proto == NULL) if (!hdlc->proto)
return -ENOSYS; /* no protocol attached */ return -ENOSYS; /* no protocol attached */
if (hdlc->proto->open) { if (hdlc->proto->open) {
...@@ -284,7 +284,7 @@ int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto, ...@@ -284,7 +284,7 @@ int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto,
if (size) { if (size) {
dev_to_hdlc(dev)->state = kmalloc(size, GFP_KERNEL); dev_to_hdlc(dev)->state = kmalloc(size, GFP_KERNEL);
if (dev_to_hdlc(dev)->state == NULL) { if (!dev_to_hdlc(dev)->state) {
module_put(proto->module); module_put(proto->module);
return -ENOBUFS; return -ENOBUFS;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment