Re: cxgb4: Add routines to create and remove listening IPv6 servers

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

 



On Tue, Mar 01, 2016 at 04:29:40AM +0530, Dan Carpenter wrote:
> Hello Vipul Pandya,
> 
> The patch 80f40c1f7a72: "cxgb4: Add routines to create and remove
> listening IPv6 servers" from Jul 4, 2013, leads to the following
> static checker warning:
> 
> 	drivers/target/iscsi/cxgbit/cxgbit_cm.c:419 cxgbit_free_np()
> 	warn: 'ret' can be either negative or positive
> 
> drivers/target/iscsi/cxgbit/cxgbit_cm.c
>    382  
>    383                  cxgbit_get_cnp(cnp);
>    384                  cxgbit_init_wr_wait(&cnp->com.wr_wait);
>    385                  ret = cxgb4_remove_server(cdev->lldi.ports[0], stid,
>    386                                            cdev->lldi.rxq_ids[0], ipv6);
> 
> It's complaining because normally kernel function return negative error
> codes but cxgb4_remove_server() returns NET_XMIT_DROP (1) for some
> errors.
> 
> It's harmless in this case other than the static checker warning.  There
> is no comment why we return 1 for some errors.
> 
>    387                  if (ret) {
>    388                          cxgbit_put_cnp(cnp);
>    389                          continue;
>    390                  }

cxgb4_remove_server() can return NET_XMIT_DROP, I will add a check
for positive return value.

			if (ret > 0)
				ret = net_xmit_errno(ret);

			if (ret) {
				cxgbit_put_cnp(cnp);
				continue;
			}	
  
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux