Commit d72e1a1c authored by Sameer Wadgaonkar's avatar Sameer Wadgaonkar Committed by Greg Kroah-Hartman
Browse files

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: default avatarSameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Reviewed-by: default avatarDavid Binder <david.binder@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 55b7bd03
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -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;
	}
	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;
	}
	kfree(dev->vbus_hdr_info);
	list_del(&dev->list_all);
	device_unregister(&dev->device);