Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63f5c289 authored by Ben Dooks's avatar Ben Dooks
Browse files

I2C: S3C2410: Fixup error codes returned rom a transfer.



The driver should be returning -ENXIO for transfers that do not
pass the initial address byte stage.

Note, also small tidyups to the driver comments in the area.

Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent 2709781b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -295,7 +295,7 @@ static int i2s_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
			/* ack was not received... */

			dev_dbg(i2c->dev, "ack was not received\n");
			s3c24xx_i2c_stop(i2c, -EREMOTEIO);
			s3c24xx_i2c_stop(i2c, -ENXIO);
			goto out_ack;
		}

@@ -305,7 +305,7 @@ static int i2s_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
			i2c->state = STATE_WRITE;

		/* terminate the transfer if there is nothing to do
		 * (used by the i2c probe to find devices */
		 * as this is used by the i2c probe to find devices. */

		if (is_lastmsg(i2c) && i2c->msg->len == 0) {
			s3c24xx_i2c_stop(i2c, 0);