rapidio: delete an unnecessary variable initialisation in three functions
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 6 Feb 2018 23:39:55 +0000 (15:39 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Feb 2018 02:32:46 +0000 (18:32 -0800)
The local variable "rc" will be set to an appropriate value a bit later.
Thus omit the explicit initialisation at the beginning.

Link: http://lkml.kernel.org/r/ed729e8c-815c-8b56-a48f-1be579d0cc2b@users.sourceforge.net
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rapidio/rio.c

index 9053436..4604410 100644 (file)
@@ -441,7 +441,7 @@ int rio_request_inb_dbell(struct rio_mport *mport,
                          void (*dinb) (struct rio_mport * mport, void *dev_id, u16 src,
                                        u16 dst, u16 info))
 {
-       int rc = 0;
+       int rc;
        struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);
 
        if (res) {
@@ -693,7 +693,7 @@ EXPORT_SYMBOL_GPL(rio_pw_enable);
 int rio_map_inb_region(struct rio_mport *mport, dma_addr_t local,
                        u64 rbase, u32 size, u32 rflags)
 {
-       int rc = 0;
+       int rc;
        unsigned long flags;
 
        if (!mport->ops->map_inb)
@@ -737,7 +737,7 @@ EXPORT_SYMBOL_GPL(rio_unmap_inb_region);
 int rio_map_outb_region(struct rio_mport *mport, u16 destid, u64 rbase,
                        u32 size, u32 rflags, dma_addr_t *local)
 {
-       int rc = 0;
+       int rc;
        unsigned long flags;
 
        if (!mport->ops->map_outb)