diff options
author | Pavel Skripkin <paskripkin@gmail.com> | 2021-06-03 19:38:51 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-03 15:05:06 -0700 |
commit | a2805dca5107d5603f4bbc027e81e20d93476e96 (patch) | |
tree | 922655a2a8a02688d837e864ccef6506a2b24342 /include/net/caif/cfcnfg.h | |
parent | bce130e7f392ddde8cfcb09927808ebd5f9c8669 (diff) | |
download | linux-a2805dca5107d5603f4bbc027e81e20d93476e96.tar.gz |
net: caif: add proper error handling
caif_enroll_dev() can fail in some cases. Ingnoring
these cases can lead to memory leak due to not assigning
link_support pointer to anywhere.
Fixes: 7c18d2205ea7 ("caif: Restructure how link caif link layer enroll")
Cc: stable@vger.kernel.org
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/caif/cfcnfg.h')
-rw-r--r-- | include/net/caif/cfcnfg.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/caif/cfcnfg.h b/include/net/caif/cfcnfg.h index 2aa5e91d8457..8819ff4db35a 100644 --- a/include/net/caif/cfcnfg.h +++ b/include/net/caif/cfcnfg.h @@ -62,7 +62,7 @@ void cfcnfg_remove(struct cfcnfg *cfg); * @fcs: Specify if checksum is used in CAIF Framing Layer. * @head_room: Head space needed by link specific protocol. */ -void +int cfcnfg_add_phy_layer(struct cfcnfg *cnfg, struct net_device *dev, struct cflayer *phy_layer, enum cfcnfg_phy_preference pref, |