Skip to contentSkip to conversation

gspca: sn9c2028: remove an unneeded condition

PATCH In review Dan Carpenter 2 participants 2 messages Jun 4, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gspca: sn9c2028: remove an unneeded condition

We already know status is negative because of the earlier check so there is no need to check again.

drivers/media/usb/gspca/sn9c2028.c +1 -1
index c75b738..4f2050a 100644
@@ -140,7 +140,7 @@ static int sn9c2028_long_command(struct gspca_dev *gspca_dev, u8 *command)
 		status = sn9c2028_read1(gspca_dev);
 	if (status < 0) {
 		pr_err("long command status read error %d\n", status);
-		return (status < 0) ? status : -EIO;
+		return status;
 	}
 
 	memset(reading, 0, 4);
Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 4 lines · Dan Carpenter

We already know status is negative because of the earlier check so there is no need to check again.

Makes sense:

Mauro, can you pick this one up directly please?

Regards,

Hans

Quoted 19 lines
drivers/media/usb/gspca/sn9c2028.c +1 -2
index c75b738..4f2050a 100644
@@ -140,7 +140,7 @@ static int sn9c2028_long_command(struct gspca_dev *gspca_dev, u8 *command)
  		status = sn9c2028_read1(gspca_dev);
  	if (status < 0) {
  		pr_err("long command status read error %d\n", status);
-		return (status < 0) ? status : -EIO;
+		return status;
  	}
 
  	memset(reading, 0, 4);
--

To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html