Skip to content

Commit

Permalink
Merge branch 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/tj/libata

Pull libata fixes from Tejun Heo:
 "Two trivial fixes - one for a bug in the allocation failure path and
  the other a compiler warning fix"

* 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  ata: sata_mv: fix mis-conversion in mv_write_cached_reg()
  ata: fix return value check in ahci_seattle_get_port_info()
  • Loading branch information
Linus Torvalds committed Jun 28, 2016
2 parents 595d9e3 + 76bf344 commit de4921c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/ata/ahci_seattle.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static const struct ata_port_info *ahci_seattle_get_port_info(
u32 val;

plat_data = devm_kzalloc(dev, sizeof(*plat_data), GFP_KERNEL);
if (IS_ERR(plat_data))
if (!plat_data)
return &ahci_port_info;

plat_data->sgpio_ctrl = devm_ioremap_resource(dev,
Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/sata_mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ static inline void mv_write_cached_reg(void __iomem *addr, u32 *old, u32 new)
* Looks like a lot of fuss, but it avoids an unnecessary
* +1 usec read-after-write delay for unaffected registers.
*/
laddr = (long)addr & 0xffff;
laddr = (unsigned long)addr & 0xffff;
if (laddr >= 0x300 && laddr <= 0x33c) {
laddr &= 0x000f;
if (laddr == 0x4 || laddr == 0xc) {
Expand Down

0 comments on commit de4921c

Please sign in to comment.