Re: [PATCH 1/2] staging: unisys: remove unused variables

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

 



On Thu, Mar 12, 2015 at 07:44:20PM +0530, Sudip Mukherjee wrote:
> these variable were being assigned some values but never reused.
> 
> Signed-off-by: Sudip Mukherjee <sudip@xxxxxxxxxxxxxxx>
> ---
>  drivers/staging/unisys/virthba/virthba.c | 18 ++++++------------
>  drivers/staging/unisys/virtpci/virtpci.c | 22 +++++++---------------
>  2 files changed, 13 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
> index e5b0dd8..655db2f 100644
> --- a/drivers/staging/unisys/virthba/virthba.c
> +++ b/drivers/staging/unisys/virthba/virthba.c
> @@ -333,16 +333,14 @@ static inline void
>  send_disk_add_remove(struct diskaddremove *dar)
>  {
>  	struct scsi_device *sdev;
> -	int error;
>  
>  	sdev = scsi_device_lookup(dar->shost, dar->channel, dar->id, dar->lun);
>  	if (sdev) {
>  		if (!(dar->add))
>  			scsi_remove_device(sdev);
>  	} else if (dar->add) {
> -		error =
> -		    scsi_add_device(dar->shost, dar->channel, dar->id,
> -				    dar->lun);
> +		scsi_add_device(dar->shost, dar->channel, dar->id,
> +				dar->lun);

This should be properly checked, not ignored.

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-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