mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
net: hsr: fix NULL checks in the code
This patch replaces all instance of NULL checks such as if (foo == NULL) with if (!foo) Also if (foo != NULL) with if (foo) This is seen when ran checkpatch.pl -f on files under net/hsr and suggestion is to replace as above. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0525fc069f
commit
05ca6e644d
5 changed files with 13 additions and 13 deletions
|
@ -30,12 +30,12 @@ static int hsr_netdev_notify(struct notifier_block *nb, unsigned long event,
|
|||
|
||||
dev = netdev_notifier_info_to_dev(ptr);
|
||||
port = hsr_port_get_rtnl(dev);
|
||||
if (port == NULL) {
|
||||
if (!port) {
|
||||
if (!is_hsr_master(dev))
|
||||
return NOTIFY_DONE; /* Not an HSR device */
|
||||
hsr = netdev_priv(dev);
|
||||
port = hsr_port_get_hsr(hsr, HSR_PT_MASTER);
|
||||
if (port == NULL) {
|
||||
if (!port) {
|
||||
/* Resend of notification concerning removed device? */
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue