spi: kill useless initializer in spi_register_master()
diff mbox series

Message ID 8abe16d7-acf9-d2de-80c4-e154873c3efe@cogentembedded.com
State New, archived
Headers show
Series
  • spi: kill useless initializer in spi_register_master()
Related show

Commit Message

Sergei Shtylyov April 4, 2019, 8:12 p.m. UTC
The 'status' local variable is initialized but this value is never used,
thus kill that initializer.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
The patch is against the 'spi-next' branch of Mark Brown's 'spi.git' repo.

 drivers/spi/spi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown April 5, 2019, 3:08 a.m. UTC | #1
On Thu, Apr 04, 2019 at 11:12:36PM +0300, Sergei Shtylyov wrote:
> The 'status' local variable is initialized but this value is never used,
> thus kill that initializer.

This doesn't apply againsnt current code, please check and resend.
Sergei Shtylyov April 5, 2019, 12:02 p.m. UTC | #2
Hello!

On 04/05/2019 06:08 AM, Mark Brown wrote:

>> The 'status' local variable is initialized but this value is never used,
>> thus kill that initializer.
> 
> This doesn't apply againsnt current code, please check and resend.

   Ah, so 'spi-next' was an abandoned branch. Sorry, will repost...

MBR, Sergei
Mark Brown April 8, 2019, 6:12 a.m. UTC | #3
On Fri, Apr 05, 2019 at 03:02:35PM +0300, Sergei Shtylyov wrote:
> On 04/05/2019 06:08 AM, Mark Brown wrote:

> > This doesn't apply againsnt current code, please check and resend.

>    Ah, so 'spi-next' was an abandoned branch. Sorry, will repost...

It's the branch that's included in -next...

Patch
diff mbox series

Index: spi/drivers/spi/spi.c
===================================================================
--- spi.orig/drivers/spi/spi.c
+++ spi/drivers/spi/spi.c
@@ -1567,7 +1567,7 @@  int spi_register_master(struct spi_maste
 	static atomic_t		dyn_bus_id = ATOMIC_INIT((1<<15) - 1);
 	struct device		*dev = master->dev.parent;
 	struct boardinfo	*bi;
-	int			status = -ENODEV;
+	int			status;
 	int			dynamic = 0;
 
 	if (!dev)