OSDN Git Service

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)
commit3df7e8a77e8cac1daea3ad0842ed3fd2105f98f0
tree67cb721be2ef43ca601a32f03544c7ebdd7900cf
parente416dad158f289ef2af48bf21fca53acc3935353
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