spi: img-spfi: fix potential double release
Pan Bian authored

The channels spfi->tx_ch and spfi->rx_ch are not set to NULL after they
are released. As a result, they will be released again, either on the
error handling branch in the same function or in the corresponding
remove function, i.e. img_spfi_remove(). This patch fixes the bug by
setting the two members to NULL.
Signed-off-by: default avatarPan Bian <bianpan2016@163.com>
Link: https://lore.kernel.org/r/1573007769-20131-1-git-send-email-bianpan2016@163.com

Signed-off-by: default avatarMark Brown <broonie@kernel.org>
e9a8ba97
Name Last commit Last update
Documentation spi: xilinx: add description of new property xlnx,num-transfer-bits
LICENSES LICENSES: Rename other to deprecated
arch spi: pxa2xx: No need to keep pointer to platform device
block block: fix null pointer dereference in blk_mq_rq_timed_out()
certs PKCS#7: Refactor verify_pkcs7_signature()
crypto Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
drivers spi: img-spfi: fix potential double release
fs Merge tag 'for-5.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
include spi: document CS setup, hold & inactive times in header
init Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
ipc ipc/sem.c: convert to use built-in RCU list checking
kernel Merge tag 'trace-v5.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
lib Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
mm Merge branch 'hugepage-fallbacks' (hugepatch patches from David Rientjes)
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
samples Merge tag 'rpmsg-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc
scripts Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity
security Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
sound spi: pxa2xx: No need to keep pointer to platform device
tools Merge tag 'trace-v5.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
usr Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
virt Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
.clang-format clang-format: Update with the latest for_each macro list
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.