summaryrefslogtreecommitdiff
path: root/drivers/staging/unisys/include
diff options
context:
space:
mode:
authorDavid Kershner <david.kershner@unisys.com>2017-08-30 13:36:17 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-31 18:17:39 +0200
commit68f4f7665caef801d1ad361f613a9edd7c40bb16 (patch)
tree3955fbb920fe2ffd1ad485987f433dfb5f19f56c /drivers/staging/unisys/include
parent9a8dc900ec8929c63345350d544c349c687e2055 (diff)
staging: unisys: Don't check for null before getting driver device.
The macro to convert to the driver object was giving a checkpatch warning when it ateempted to check for a null driver. It would return NULL if it found it, but only one location was checking to see if it was NULL. Remove the check in the MACRO and do it prior to calling the macro if required. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/include')
-rw-r--r--drivers/staging/unisys/include/visorbus.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h
index e97bb5ffb0dd..0af54774d7b5 100644
--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -104,8 +104,7 @@ struct visor_driver {
struct device_driver driver;
};
-#define to_visor_driver(x) ((x) ? \
- (container_of(x, struct visor_driver, driver)) : (NULL))
+#define to_visor_driver(x) (container_of(x, struct visor_driver, driver))
/**
* struct visor_device - A device type for things "plugged" into the visorbus