summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSameer Wadgaonkar <sameer.wadgaonkar@unisys.com>2017-07-17 16:16:56 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-18 08:48:41 +0200
commitd72e1a1c48aae96988da27fc5feb32ab1141ebef (patch)
tree47782f003eae6856e79f2d635ed8565129fc63e3
parent55b7bd03f8af93fe2014a1784939cb8e1c94fa69 (diff)
staging: unisys: visorbus: visorbus_main.c: remove extra checks for dev->visorchannel
Removed checks for dev->visorchannel in visorbus_release_device() and visorbus_remove_instance() since it is also checked in the visorchannel_destroy() function. Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: David Binder <david.binder@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/unisys/visorbus/visorbus_main.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 1a212ecdd4fa..bdebd58cae86 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -156,10 +156,7 @@ visorbus_release_device(struct device *xdev)
{
struct visor_device *dev = to_visor_device(xdev);
- if (dev->visorchannel) {
- visorchannel_destroy(dev->visorchannel);
- dev->visorchannel = NULL;
- }
+ visorchannel_destroy(dev->visorchannel);
kfree(dev);
}
@@ -1058,10 +1055,7 @@ visorbus_remove_instance(struct visor_device *dev)
* successfully been able to trace thru the code to see where/how
* release() gets called. But I know it does.
*/
- if (dev->visorchannel) {
- visorchannel_destroy(dev->visorchannel);
- dev->visorchannel = NULL;
- }
+ visorchannel_destroy(dev->visorchannel);
kfree(dev->vbus_hdr_info);
list_del(&dev->list_all);
device_unregister(&dev->device);