Merge tag 'staging-4.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging fixes from Greg KH:
 "Here are some small staging driver fixes for 4.15-rc4.

  One patch for the ccree driver to prevent an unitialized value from
  being returned to a caller, and the other fixes a logic error in the
  pi433 driver"

* tag 'staging-4.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: pi433: Fixes issue with bit shift in rf69_get_modulation
  staging: ccree: Uninitialized return in ssi_ahash_import()
This commit is contained in:
Linus Torvalds 2017-12-15 12:59:48 -08:00
Родитель d6e47eed05 202fc673c6
Коммит a84ec72324
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -1769,7 +1769,7 @@ static int ssi_ahash_import(struct ahash_request *req, const void *in)
struct device *dev = drvdata_to_dev(ctx->drvdata); struct device *dev = drvdata_to_dev(ctx->drvdata);
struct ahash_req_ctx *state = ahash_request_ctx(req); struct ahash_req_ctx *state = ahash_request_ctx(req);
u32 tmp; u32 tmp;
int rc; int rc = 0;
memcpy(&tmp, in, sizeof(u32)); memcpy(&tmp, in, sizeof(u32));
if (tmp != CC_EXPORT_MAGIC) { if (tmp != CC_EXPORT_MAGIC) {

Просмотреть файл

@ -102,7 +102,7 @@ enum modulation rf69_get_modulation(struct spi_device *spi)
currentValue = READ_REG(REG_DATAMODUL); currentValue = READ_REG(REG_DATAMODUL);
switch (currentValue & MASK_DATAMODUL_MODULATION_TYPE >> 3) { // TODO improvement: change 3 to define switch (currentValue & MASK_DATAMODUL_MODULATION_TYPE) {
case DATAMODUL_MODULATION_TYPE_OOK: return OOK; case DATAMODUL_MODULATION_TYPE_OOK: return OOK;
case DATAMODUL_MODULATION_TYPE_FSK: return FSK; case DATAMODUL_MODULATION_TYPE_FSK: return FSK;
default: return undefined; default: return undefined;