[haiku-commits] Re: r38402 - haiku/trunk/src/add-ons/kernel/drivers/disk/usb/usb_floppy

  • From: Philippe Saint-Pierre <stpere@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 23 Nov 2011 21:51:43 -0500

Hi Adrien,
>  status_t
>  usb_disk_test_unit_ready(device_lun *lun)
>  {
> -       // if unsupported we assume the unit is fixed and therefore always ok
> -       if (!lun->device->tur_supported)
> -               return B_OK;
> +       return B_OK;
>
>        uint8 commandBlock[12];
>        memset(commandBlock, 0, sizeof(commandBlock));
> @@ -439,15 +469,8 @@
>        commandBlock[0] = SCSI_TEST_UNIT_READY_6;
>        commandBlock[1] = lun->logical_unit_number << 5;
>
> -       status_t result;
> -       result = usb_disk_operation(lun, commandBlock, 0, 0,
> -               NULL, NULL, false);
> +       status_t result = usb_disk_operation(lun, commandBlock, NULL, NULL, 
> false);

Was the "return B_OK;" whished for ?  it prevents your also added
status_t result = ... part from ever running :)

It's also returned as Coverity Issue CID 10327.

Thanks!

Philippe

Other related posts: