Re: [PATCH 8/9] staging: brcm80211: fix checkpatch error 'assignment in if condition'

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

 



Joe Perches wrote:
On Thu, 2010-09-30 at 10:43 -0400, Jason Cooper wrote:
 drivers/staging/brcm80211/brcmfmac/wl_iw.c |  286 +++++++++++++++++-----------
@@ -461,9 +470,14 @@ wl_iw_get_mode(struct net_device *dev,
WL_TRACE(("%s: SIOCGIWMODE\n", dev->name)); - if ((error = dev_wlc_ioctl(dev, WLC_GET_INFRA, &infra, sizeof(infra)))
-	    || (error = dev_wlc_ioctl(dev, WLC_GET_AP, &ap, sizeof(ap))))
+	error = dev_wlc_ioctl(dev, WLC_GET_INFRA, &infra, sizeof(infra));
+	if (error) {
 		return error;
+	} else {
+		error = dev_wlc_ioctl(dev, WLC_GET_AP, &ap, sizeof(ap));
+		if (error)
+			return error;
+	}

Hi Jason.

The added else is ugly.


Somehow, I knew that was coming... :-)

or it should be multiple lines like:

	error = dev_wlc_ioctl(dev, WLC_GET_INFRA, &infra, sizeof(infra));
	if (error)
		return error;

	error = dev_wlc_ioctl(dev, WLC_GET_AP, &ap, sizeof(ap));
	if (error)
		return error;


If Henry has no objections, I'll do the above across the series and resubmit.

thx,

Jason.
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux