diff mbox

[media] gspca: sn9c2028: remove an unneeded condition

Message ID 20150604085226.GA22838@mwanda (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter June 4, 2015, 8:52 a.m. UTC
We already know status is negative because of the earlier check so there
is no need to check again.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

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

Comments

Hans de Goede June 4, 2015, 10:24 a.m. UTC | #1
Hi,

On 04-06-15 10:52, Dan Carpenter wrote:
> We already know status is negative because of the earlier check so there
> is no need to check again.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Makes sense:

Acked-by: Hans de Goede <hdegoede@redhat.com>

Mauro, can you pick this one up directly please?

Regards,

Hans


>
> diff --git a/drivers/media/usb/gspca/sn9c2028.c b/drivers/media/usb/gspca/sn9c2028.c
> index c75b738..4f2050a 100644
> --- a/drivers/media/usb/gspca/sn9c2028.c
> +++ b/drivers/media/usb/gspca/sn9c2028.c
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/usb/gspca/sn9c2028.c b/drivers/media/usb/gspca/sn9c2028.c
index c75b738..4f2050a 100644
--- a/drivers/media/usb/gspca/sn9c2028.c
+++ b/drivers/media/usb/gspca/sn9c2028.c
@@ -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);