RE: [RFC/PATCH 2/6] v4l: subdev: Add device node support

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

 



Hi,

>>v4l2_device *v4l2_dev,
>> 		if (err && err != -ENOIOCTLCMD) {
>> 			v4l2_device_unregister_subdev(sd);
>> 			sd = NULL;
>>+		} else {
>>+			sd->initialized = 1;
>> 		}
>
>Wouldn't checkpatch.pl script complain about { } on the else part since
>there is only one statement?
>> 	}
>>


CodingStyle is 100% clear on this:


Do not unnecessarily use braces where a single statement will do.

if (condition)
        action();

This does not apply if one branch of a conditional statement is a single
statement. Use braces in both branches.

if (condition) {
        do_this();
        do_that();
} else {
        otherwise();
}

Best regards
--
Pawel Osciak
Linux Platform Group
Samsung Poland R&D Center


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


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux