* [patch] [media] gspca: sn9c2028: remove an unneeded condition
@ 2015-06-04 8:52 Dan Carpenter
2015-06-04 10:24 ` Hans de Goede
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-06-04 8:52 UTC (permalink / raw)
To: Hans de Goede; +Cc: Mauro Carvalho Chehab, linux-media, kernel-janitors
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>
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] [media] gspca: sn9c2028: remove an unneeded condition
2015-06-04 8:52 [patch] [media] gspca: sn9c2028: remove an unneeded condition Dan Carpenter
@ 2015-06-04 10:24 ` Hans de Goede
0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2015-06-04 10:24 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Mauro Carvalho Chehab, linux-media, kernel-janitors
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-04 10:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-04 8:52 [patch] [media] gspca: sn9c2028: remove an unneeded condition Dan Carpenter
2015-06-04 10:24 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).