[PATCH 2.6.2] drivers/usb/storage/dpcm.c

From: Bryan Whitehead
Date: Thu Feb 05 2004 - 02:00:52 EST



If CONFIG_USB_STORAGE_SDDR09 is not set the var "ret" is not used. This makes use
of ret for all cases to avoid warning generated by compiler about unused variable.

Patch:
--- linux-2.6.2/drivers/usb/storage/dpcm.c.orig 2004-02-04 22:48:41.317859936 -0800
+++ linux-2.6.2/drivers/usb/storage/dpcm.c 2004-02-04 22:49:00.824894416 -0800
@@ -56,7 +56,8 @@ int dpcm_transport(Scsi_Cmnd *srb, struc
/*
* LUN 0 corresponds to the CompactFlash card reader.
*/
- return usb_stor_CB_transport(srb, us);
+ ret = usb_stor_CB_transport(srb, us);
+ break;

#ifdef CONFIG_USB_STORAGE_SDDR09
case 1:
@@ -72,11 +73,12 @@ int dpcm_transport(Scsi_Cmnd *srb, struc
ret = sddr09_transport(srb, us);
srb->device->lun = 1; us->srb->device->lun = 1;

- return ret;
+ break;
#endif

default:
US_DEBUGP("dpcm_transport: Invalid LUN %d\n", srb->device->lun);
- return USB_STOR_TRANSPORT_ERROR;
+ ret = USB_STOR_TRANSPORT_ERROR;
}
+ return ret;
}


--
Bryan Whitehead
driver@xxxxxxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/