Skip to content

Commit 10e806d

Browse files
JasonYanHwwsakernel
authored andcommitted
i2c: s3c2410: make i2c_s3c_irq_nextbyte() void
Fix the following coccicheck warning: drivers/i2c/busses/i2c-s3c2410.c:391:5-8: Unneeded variable: "ret". Return "0" on line 552 Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent ca562a9 commit 10e806d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/i2c/busses/i2c-s3c2410.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static const struct platform_device_id s3c24xx_driver_ids[] = {
133133
};
134134
MODULE_DEVICE_TABLE(platform, s3c24xx_driver_ids);
135135

136-
static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat);
136+
static void i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat);
137137

138138
#ifdef CONFIG_OF
139139
static const struct of_device_id s3c24xx_i2c_match[] = {
@@ -377,11 +377,10 @@ static inline int is_msgend(struct s3c24xx_i2c *i2c)
377377
/*
378378
* process an interrupt and work out what to do
379379
*/
380-
static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
380+
static void i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
381381
{
382382
unsigned long tmp;
383383
unsigned char byte;
384-
int ret = 0;
385384

386385
switch (i2c->state) {
387386

@@ -544,7 +543,7 @@ static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
544543
tmp &= ~S3C2410_IICCON_IRQPEND;
545544
writel(tmp, i2c->regs + S3C2410_IICCON);
546545
out:
547-
return ret;
546+
return;
548547
}
549548

550549
/*

0 commit comments

Comments
 (0)