Skip to content

Commit

Permalink
tpm_crb: fix address space of the return pointer in crb_map_res()
Browse files Browse the repository at this point in the history
When running make C=2 M=drivers/char/tpm/

  CHECK   drivers/char/tpm//tpm_crb.c
drivers/char/tpm//tpm_crb.c:248:31: warning: incorrect type in return expression (different address spaces)
drivers/char/tpm//tpm_crb.c:248:31:    expected void [noderef] <asn:2>*
drivers/char/tpm//tpm_crb.c:248:31:    got void *

CC: stable@vger.kernel.org
Fixes: 1bd047b ("tpm_crb: Use devm_ioremap_resource")
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
  • Loading branch information
Jarkko Sakkinen committed Jun 25, 2016
1 parent 9da7e78 commit f786b75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/tpm/tpm_crb.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static void __iomem *crb_map_res(struct device *dev, struct crb_priv *priv,

/* Detect a 64 bit address on a 32 bit system */
if (start != new_res.start)
return ERR_PTR(-EINVAL);
return (void __iomem *) ERR_PTR(-EINVAL);

if (!resource_contains(io_res, &new_res))
return devm_ioremap_resource(dev, &new_res);
Expand Down

0 comments on commit f786b75

Please sign in to comment.