]> git.baikalelectronics.ru Git - kernel.git/commit
staging: kpc2000: removed superfluous NULL checks from device attribute call-backs.
authorJeremy Sowden <jeremy@azazel.net>
Tue, 21 May 2019 10:35:24 +0000 (11:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 May 2019 12:44:22 +0000 (14:44 +0200)
commit53c6f3103e65b31a0aa837d09a10004440394cfb
tree67cb721be2ef43ca601a32f03544c7ebdd7900cf
parent700d653d2de465656e4ed7831ec52a5ac5193af2
staging: kpc2000: removed superfluous NULL checks from device attribute call-backs.

All the attribute show call-backs check whether pcard is NULL.  However,
pci_set_drvdata(pdev, pcard) is called before the sysfs files are
created during probe, and pci_set_drvdata(pdev, NULL) is not called
until after they are destroyed during remove; therefore, pcard will not
be NULL, and we can drop the checks.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/kpc2000/kpc2000/core.c