]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: unisys: visorbus: visorchipset.c: Remove useless initializations
authorDavid Kershner <david.kershner@unisys.com>
Wed, 27 Sep 2017 17:14:37 +0000 (13:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Sep 2017 09:20:21 +0000 (11:20 +0200)
Found several more useless initializations in visorchipset.c get rid of
them.

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>
drivers/staging/unisys/visorbus/visorchipset.c

index ab5c5c22450b9b68d0ede67dbffbd89056f48eb9..ac218f3b9f1724ee756c0c2fd0199becb52f1e58 100644 (file)
@@ -457,7 +457,7 @@ static int device_changestate_responder(
 static int visorbus_create(struct controlvm_message *inmsg)
 {
        struct controlvm_message_packet *cmd = &inmsg->cmd;
-       struct controlvm_message_header *pmsg_hdr = NULL;
+       struct controlvm_message_header *pmsg_hdr;
        u32 bus_no = cmd->create_bus.bus_no;
        struct visor_device *bus_info;
        struct visorchannel *visorchannel;
@@ -524,7 +524,7 @@ static int visorbus_create(struct controlvm_message *inmsg)
 
 static int visorbus_destroy(struct controlvm_message *inmsg)
 {
-       struct controlvm_message_header *pmsg_hdr = NULL;
+       struct controlvm_message_header *pmsg_hdr;
        u32 bus_no = inmsg->cmd.destroy_bus.bus_no;
        struct visor_device *bus_info;
        int err;
@@ -587,7 +587,7 @@ static void *parser_string_get(u8 *pscan, int nscan)
 
 static void *parser_name_get(struct parser_context *ctx)
 {
-       struct visor_controlvm_parameters_header *phdr = NULL;
+       struct visor_controlvm_parameters_header *phdr;
 
        phdr = &ctx->data;
        if (phdr->name_offset + phdr->name_length > ctx->param_bytes)
@@ -644,10 +644,10 @@ static int visorbus_configure(struct controlvm_message *inmsg,
 static int visorbus_device_create(struct controlvm_message *inmsg)
 {
        struct controlvm_message_packet *cmd = &inmsg->cmd;
-       struct controlvm_message_header *pmsg_hdr = NULL;
+       struct controlvm_message_header *pmsg_hdr;
        u32 bus_no = cmd->create_device.bus_no;
        u32 dev_no = cmd->create_device.dev_no;
-       struct visor_device *dev_info = NULL;
+       struct visor_device *dev_info;
        struct visor_device *bus_info;
        struct visorchannel *visorchannel;
        int err;
@@ -732,7 +732,7 @@ static int visorbus_device_create(struct controlvm_message *inmsg)
 static int visorbus_device_changestate(struct controlvm_message *inmsg)
 {
        struct controlvm_message_packet *cmd = &inmsg->cmd;
-       struct controlvm_message_header *pmsg_hdr = NULL;
+       struct controlvm_message_header *pmsg_hdr;
        u32 bus_no = cmd->device_change_state.bus_no;
        u32 dev_no = cmd->device_change_state.dev_no;
        struct visor_segment_state state = cmd->device_change_state.state;
@@ -790,7 +790,7 @@ static int visorbus_device_changestate(struct controlvm_message *inmsg)
 static int visorbus_device_destroy(struct controlvm_message *inmsg)
 {
        struct controlvm_message_packet *cmd = &inmsg->cmd;
-       struct controlvm_message_header *pmsg_hdr = NULL;
+       struct controlvm_message_header *pmsg_hdr;
        u32 bus_no = cmd->destroy_device.bus_no;
        u32 dev_no = cmd->destroy_device.dev_no;
        struct visor_device *dev_info;
@@ -1380,7 +1380,7 @@ static int handle_command(struct controlvm_message inmsg, u64 channel_addr)
         * makes a difference in how we compute the virtual address.
         */
        if (parm_bytes) {
-               bool retry = false;
+               bool retry;
 
                parser_ctx = parser_init_stream(parm_addr, parm_bytes, &retry);
                if (!parser_ctx && retry)