Skip to content

Commit db91586

Browse files
committed
ata: libata-scsi: Fix ata_mselect_control_ata_feature() return type
The function ata_mselect_control_ata_feature() has a return type defined as unsigned int but this function may return negative error codes, which are correctly propagated up the call chain as integers. Fix ata_mselect_control_ata_feature() to have the correct int return type. While at it, also fix a typo in this function description comment. Fixes: df60f9c ("scsi: ata: libata: Add ATA feature control sub-page translation") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Niklas Cassel <cassel@kernel.org> Reviewed-by: Igor Pylypiv <ipylypiv@google.com>
1 parent 399eab7 commit db91586

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/ata/libata-scsi.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3886,12 +3886,11 @@ static int ata_mselect_control_spg0(struct ata_queued_cmd *qc,
38863886
}
38873887

38883888
/*
3889-
* Translate MODE SELECT control mode page, sub-pages f2h (ATA feature mode
3889+
* Translate MODE SELECT control mode page, sub-page f2h (ATA feature mode
38903890
* page) into a SET FEATURES command.
38913891
*/
3892-
static unsigned int ata_mselect_control_ata_feature(struct ata_queued_cmd *qc,
3893-
const u8 *buf, int len,
3894-
u16 *fp)
3892+
static int ata_mselect_control_ata_feature(struct ata_queued_cmd *qc,
3893+
const u8 *buf, int len, u16 *fp)
38953894
{
38963895
struct ata_device *dev = qc->dev;
38973896
struct ata_taskfile *tf = &qc->tf;

0 commit comments

Comments
 (0)