Re: [PATCH v2 2/2] leds: add sgm3140 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luca

On 4/4/20 4:36 AM, Luca Weiss wrote:
+ fled_cdev, NULL,
<snip>
+					   &v4l2_sd_cfg);
+	if (IS_ERR(priv->v4l2_flash)) {
+		ret = PTR_ERR(priv->v4l2_flash);
+		goto err;
Not sure why this is here you are not in a for loop and this will fall
through anyway to the err label.

I kept the goto in, in case more code is added below that statement so the
author doesn't forget that this error needs to be handled.
If wanted I can remove it of course.

I am ok with all the reasoning in the previous comments.  This one I would say just fall through to out.

If there is other code added after this then it can be added in.

Dan




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux