Re: [PATCH 2/4] dpt_i2o: make adpt_i2o_to_scsi() a void function

Christoph Hellwig
2019-11-15T08:51:32Z

On Fri, Nov 15, 2019 at 09:05:53AM +0100, Hannes Reinecke wrote:
> The return value is never used anywhere, and returning it
> risks a use-after-free crash.

The function is also badly misnamed. Can you renamed it to
adpt_i2o_complete_cmd or something that actually describes
the function if you touch it?

> -static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd)
> +static void adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd)
> {
> adpt_hba* pHba;
> u32 hba_status;

And fix the * placement at least in the actual line you touch anyway?