]> git.baikalelectronics.ru Git - kernel.git/commit
net: caif: add proper error handling
authorPavel Skripkin <paskripkin@gmail.com>
Thu, 3 Jun 2021 16:38:51 +0000 (19:38 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Jun 2021 22:05:06 +0000 (15:05 -0700)
commita2805dca5107d5603f4bbc027e81e20d93476e96
tree922655a2a8a02688d837e864ccef6506a2b24342
parentbce130e7f392ddde8cfcb09927808ebd5f9c8669
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>
include/net/caif/caif_dev.h
include/net/caif/cfcnfg.h
net/caif/caif_dev.c
net/caif/cfcnfg.c