summaryrefslogtreecommitdiff
path: root/include/net/caif/cfcnfg.h
diff options
context:
space:
mode:
authorPavel Skripkin <paskripkin@gmail.com>2021-06-03 19:38:51 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-10 12:41:35 +0200
commita3536dce5895f714d9eead8afb92629a3fb5875b (patch)
treec65451ed1849c010982f9d1332c41207036f8fa6 /include/net/caif/cfcnfg.h
parentb1f2f8952b14e118c6be35b2be2bd24dc0d95272 (diff)
net: caif: add proper error handling
commit a2805dca5107d5603f4bbc027e81e20d93476e96 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/net/caif/cfcnfg.h')
-rw-r--r--include/net/caif/cfcnfg.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/caif/cfcnfg.h b/include/net/caif/cfcnfg.h
index 70bfd017581f..219094ace893 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,